Like global search and replace but don’t like surprises?
-
Like global search and replace but don’t like surprises?
Check out serpl – a handy little command-line app that gives you a visual preview of the changes you are about to make. You can even go in and remove the replacements you don’t want from the source previews. The regex support appears to be basic, however (I couldn’t get a negative lookbehind to work).
https://github.com/yassinebridi/serpl#readme
(Also, it appears they’re looking for maintainers. It’s written in Rust.)
-
Like global search and replace but don’t like surprises?
Check out serpl – a handy little command-line app that gives you a visual preview of the changes you are about to make. You can even go in and remove the replacements you don’t want from the source previews. The regex support appears to be basic, however (I couldn’t get a negative lookbehind to work).
https://github.com/yassinebridi/serpl#readme
(Also, it appears they’re looking for maintainers. It’s written in Rust.)
@aral Please, my child is between life and death. Please repost.
-
Like global search and replace but don’t like surprises?
Check out serpl – a handy little command-line app that gives you a visual preview of the changes you are about to make. You can even go in and remove the replacements you don’t want from the source previews. The regex support appears to be basic, however (I couldn’t get a negative lookbehind to work).
https://github.com/yassinebridi/serpl#readme
(Also, it appears they’re looking for maintainers. It’s written in Rust.)
-
Like global search and replace but don’t like surprises?
Check out serpl – a handy little command-line app that gives you a visual preview of the changes you are about to make. You can even go in and remove the replacements you don’t want from the source previews. The regex support appears to be basic, however (I couldn’t get a negative lookbehind to work).
https://github.com/yassinebridi/serpl#readme
(Also, it appears they’re looking for maintainers. It’s written in Rust.)
@aral@mastodon.ar.al for those of you using #Emacs it has a similar feature that can be run with
M-x occur. You can also run theM-x multi-occurcommand to do find/replace across multiple files.In an
occur-modebuffer, you can presseto enter "edit mode" and modify each matching line in place, then pressC-c C-cto commit those changes to the file. This allows you to do search/replace using the ordinaryC-M-%command. -
@aral@mastodon.ar.al for those of you using #Emacs it has a similar feature that can be run with
M-x occur. You can also run theM-x multi-occurcommand to do find/replace across multiple files.In an
occur-modebuffer, you can presseto enter "edit mode" and modify each matching line in place, then pressC-c C-cto commit those changes to the file. This allows you to do search/replace using the ordinaryC-M-%command.@ramin_hal9001 @aral Emacs has a number of modes that let you edit stuff in buffers, and then apply the changes, including wdired and wgrep.
-
@ilmari
️(One person’s inefficient is another’s good enough.)

-
@ramin_hal9001 @aral Emacs has a number of modes that let you edit stuff in buffers, and then apply the changes, including wdired and wgrep.
@rpluim@mastodon.social yes, I use
wdiredall the time.It is much, much more safe and reliable than using tools like
mvwhen renaming things. When I need to rename files in the terminal, I often use the commandemacs -nw -Q .to open the current directory and edit the filenames like I would a file. Plus you have access to copy/paste and find/replace and all the other usual editing tools you might need available to you as you choose your file names.Wgrep is also nice, but I don't think it comes with the standard set of built-in tools for Emacs, I think you have to install that one separately.
Multi-occur is built-in so I tend to use that one. -
@aral@mastodon.ar.al for those of you using #Emacs it has a similar feature that can be run with
M-x occur. You can also run theM-x multi-occurcommand to do find/replace across multiple files.In an
occur-modebuffer, you can presseto enter "edit mode" and modify each matching line in place, then pressC-c C-cto commit those changes to the file. This allows you to do search/replace using the ordinaryC-M-%command.@ramin_hal9001 @aral I guess you just have to reinvent emacs but in a way that they are not easily interlope-able...
-
@ramin_hal9001 @aral I guess you just have to reinvent emacs but in a way that they are not easily interlope-able...
"I guess you just have to reinvent emacs but in a way that they are not easily interlope-able"
@tusharhero@mathstodon.xyz what are you talking about?! You can use Unix pipes to make everything interoperable!!! (Sarcasm)
-
"I guess you just have to reinvent emacs but in a way that they are not easily interlope-able"
@tusharhero@mathstodon.xyz what are you talking about?! You can use Unix pipes to make everything interoperable!!! (Sarcasm)
@ramin_hal9001 @aral That might be true for some programs. But most programs (TUI) are not at all designed for that.
Vim, for example, is not at all like that. I don't know if you can at least pipe buffer regions into programs or not, probably can. But that is something I do all the time inside Emacs.
(I know you are joking).
-
@ramin_hal9001 @aral That might be true for some programs. But most programs (TUI) are not at all designed for that.
Vim, for example, is not at all like that. I don't know if you can at least pipe buffer regions into programs or not, probably can. But that is something I do all the time inside Emacs.
(I know you are joking).
@tusharhero@mathstodon.xyz yes, you gleaned the point I was making exactly.
Terminal apps are basically like cell phone apps, where there is no attempt (beyond copy-paste, or simple message passing, like what Android OS calls "intents") to make programs interoperable at all, because there is basically no infrastructure for it. I mean, sockets exist on most operating systems, but this just forces you to isolate functionality into a client-server architecture with well-defined protocols (DBus, for example), and a lot of these TUI app never even bother with such things. They are just GUIs that use ANSI terminal codes to draw things on screen.
They all operate in isolation, they all have their own unique command line syntax, their own unique configuration scripting syntax, their own unique user interface, you have to relearn everything for each TUI tool you decide to use.
To be fair, Lisp languages (e.g. Emacs) can be just as chaotic, but there is at least more of an attempt to unify all the disparate apps under a single configuration language and UI/UX philosophy. Everything can be scripted using the same, well-defined, turing-complete programming language, and messages are passed between apps using a well-structured and consistent protocol (S-expressions) that is built-in to the system itself.
-
@ramin_hal9001 @aral That might be true for some programs. But most programs (TUI) are not at all designed for that.
Vim, for example, is not at all like that. I don't know if you can at least pipe buffer regions into programs or not, probably can. But that is something I do all the time inside Emacs.
(I know you are joking).
@tusharhero @ramin_hal9001 @aral You definitely can pipe regions of a vim to buffer to a command. I'd say it's even encouraged among vim users.
-
@tusharhero @ramin_hal9001 @aral You definitely can pipe regions of a vim to buffer to a command. I'd say it's even encouraged among vim users.
@tusharhero @ramin_hal9001 @aral @oantolin eshell has nice interoperability with pipes too. i'd love to see an (async-)eshell-command available everywhere in emacs
-
@tusharhero @ramin_hal9001 @aral @oantolin eshell has nice interoperability with pipes too. i'd love to see an (async-)eshell-command available everywhere in emacs
"i'd love to see an (async-)eshell-command available everywhere in emacs"
@mekeor@mastodon.catgirl.cloud do you mean, like
M-x eshell-command?@tusharhero@mathstodon.xyz @aral@mastodon.ar.al @oantolin@mathstodon.xyz
-
"i'd love to see an (async-)eshell-command available everywhere in emacs"
@mekeor@mastodon.catgirl.cloud do you mean, like
M-x eshell-command?@tusharhero@mathstodon.xyz @aral@mastodon.ar.al @oantolin@mathstodon.xyz
@ramin_hal9001 @aral @mekeor @oantolin You go to write it and someone has already written it (I am talking about the function not the toot.)
-
@ramin_hal9001 @aral @mekeor @oantolin You go to write it and someone has already written it (I am talking about the function not the toot.)
@ramin_hal9001 @aral @mekeor @oantolin happens a lot with emacs.
-
@ramin_hal9001 @aral @mekeor @oantolin happens a lot with emacs.
"You go to write it and someone has already written it. happens a lot with emacs."
@tusharhero@mathstodon.xyz yes, it does indeed!
@aral@mastodon.ar.al @mekeor@mastodon.catgirl.cloud @oantolin@mathstodon.xyz
-
@ramin_hal9001 @aral @mekeor @oantolin You go to write it and someone has already written it (I am talking about the function not the toot.)
@ramin_hal9001 @aral @oantolin @tusharhero yes and perhaps also bind a handy key in dired to a new dired-(async-)eshell-command and also perhaps in embark keymaps etc
