[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 smartcase
" shows previews of what substitute command will do (and a couple others)
set inccommand=split
" whenever vim loses focus, save
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ść
transnationalism
heroization
technologization
Kyūshū