From 1b783875ba5f7031209887600ca50266985ec305 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Sun, 13 Sep 2020 17:32:55 +0200 Subject: [PATCH] Let nvim show the effect of a command while typing For example when typing a substitute command: live highlight the pattern and show the result to which it would be substituted. --- .config/vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index e639090..ed9d587 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -55,6 +55,14 @@ set undofile set updatetime=300 " Check for spelling in comments and strings set spell spelllang=en_us +" Show the effect of a command while typing (substitute) +if (has('nvim')) + set inccommand=nosplit +endif +" By default substitute with g flag (useful for inccommand and since I never +" substitute without the g flag. +" Specify g again to toggle it back +set gdefault " Aesthetics ################################################################### " Use 24-bit (true-color) mode