Skip to content
loading...

Preview replace results in Neovim

twitter logo github logo ・1 min read  

There is an interesting option in Neovim called inccommand. It allows you see the live preview of your buffer after some command (i.e. replace).

To configure it add following to your ~/.config/nvim/init.vim:

set inccommand=nosplit

Or if you're using ~/.vimrc to configure both vim and neovim:

if has("nvim") 
  set inccommand=nosplit
endif

Now, as you type %s/text/replace/before you hit Enter you'll see the live result of your command so you can cancel it by hitting Esc.

You can also set inccommand to split. In that case the result will be shown in a separate split pane.

twitter logo DISCUSS
Classic DEV Post from Jun 25 '19

What does your Junior interview process involve?

Explain what your junior interview process involves and what you look for in junior candidates.

Konstantin profile image
My name is Konstantin and I'm a developer based in Paris.

Creating your DEV account literally takes 30 seconds and is like casting a vote for open source, inclusion in software, and creating your profile is great for your career.

Get started now ❤️