[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:
parent
4f4e67ff1c
commit
3884d28dbd
3 changed files with 10 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
5
nvim/.config/nvim/plugin/personal/highlightyank.vim
Normal file
5
nvim/.config/nvim/plugin/personal/highlightyank.vim
Normal 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
|
|
@ -38,3 +38,5 @@ plugin
|
||||||
Solidarność
|
Solidarność
|
||||||
transnationalism
|
transnationalism
|
||||||
heroization
|
heroization
|
||||||
|
technologization
|
||||||
|
Kyūshū
|
||||||
|
|
Loading…
Reference in a new issue