News for hackers. Stuff that matters.
Re:Kakoune – A Modal Text Editor by gopher_protocol on Tuesday March 05, 2019 @06:12PM (#19315105)
I'm not arguing that Kakoune's way isn't better (I think it probably is). But you can sort of do this in Vim as well, minus the more advanced interactive adjustments:

- :set hlsearch

- Type `/`

- Spend five seconds thinking up a regex that approximately matches the things I want to change

- Hit Enter

- Cycle through matches with `n`/`N`, checking to see if they're what I expected

- If they're not, press `/` then <Up> and edit the regex

- When satisfied, type `:%s//`, enter the replacement you want to make, then `/g<Enter>` to apply the change everywhere

Re:Kakoune – A Modal Text Editor by Deimorz on Tuesday March 05, 2019 @06:21PM (#19315157)
You can also just change the command to something like :%s/regex/replacement/gc

The "c" modifier makes you confirm each replacement, and you can y/n for each of them.