News for hackers. Stuff that matters.
Re:A Vim Guide for Advanced Users by thanato0s on Saturday February 27, 2021 @11:28AM (#26285839)
Yeah I know the trick and I explain it a bit more in another article on my blog.

Most of the time it's more keystrokes than using :s though, so I'm not a big fan of it. But I see the appeal :)

Re:A Vim Guide for Advanced Users by typon on Saturday February 27, 2021 @11:31AM (#26285880)
I'm paranoid and I like seeing exactly what I'm replacing. In that case I still use :s but I always end it with :s/foo/bar/gc. Although I do see the appeal of cgn for simple replacements.
Re:A Vim Guide for Advanced Users by thanato0s on Saturday February 27, 2021 @12:02PM (#26286150)
If you use Neovim, you can set the option inccommand:

set inccommand=nosplit

It will display the substitute directly in the buffer.