[nvim] Add yank highlight and substitution preview

Added quick highlighting of whatever text is added to a yank buffer.
Added live preview of `:%s/sub/command/` in current buffer and preview
window.
This commit is contained in:
Marty Oehme 2020-07-10 10:10:34 +02:00
parent 4f4e67ff1c
commit 3884d28dbd
No known key found for this signature in database
GPG key ID: 0CCB0526EFB9611A
3 changed files with 10 additions and 0 deletions

View file

@ -138,6 +138,9 @@ set undofile
set ignorecase set ignorecase
set smartcase set smartcase
" shows previews of what substitute command will do (and a couple others)
set inccommand=split
" whenever vim loses focus, save " whenever vim loses focus, save
au FocusLost * :wa au FocusLost * :wa

View file

@ -0,0 +1,5 @@
" will highlight any text which has been yanked
augroup LuaHighlight
autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank()
augroup END

View file

@ -38,3 +38,5 @@ plugin
Solidarność Solidarność
transnationalism transnationalism
heroization heroization
technologization
Kyūshū