Woah, how did I not know about that tip about omitting the search pattern? Love it and will be using that lots!
As a thank you, I'll leave you with the way I learned to search/replace, just to give you a slightly different flavour: asterisk, cgn ([c]hange [g]o [n]ext), type replaced, then . (period, to repeat) until I'm done.
Right back at you, that’s super neat!
Re:From VS Code to Helix
by whatevertrevor on Wednesday October 29, 2025 @10:44PM
(#45755880)
Let me add my third way of doing this in vim:
:%s/<CTRL-R><CTRL-W>/replacement/(gcn)
As you can guess <CTRL-W> invokes a special register that contains the "word" currently under the cursor.Huh. I forgot about %s. I just search for a pattern and replace the first one manually. If there are fewer than ~5 occurrences, I'll just hit `n.` ~5 times and get them all. If there are more, I'll record a macro with `qqn.q`, then look at the occurence count in the bottom right corner (e.g. 50) and hit `50@q` to get them all. Sometimes the replacement text is non-constant, and this method allows for more flexibility with the recorded macro.
Sometimes it's funny to look around and see the strange local minimum of effort you've settled into.
Anyway nvim and helix are both amazing and terminal editors are both cool and sexy, so why wouldn’t you? ;)