1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

use internal yank highlight instead of plugins

This commit is contained in:
jdhao 2020-09-19 16:34:20 +08:00
parent f0abb3481a
commit ec64c3237a
2 changed files with 6 additions and 10 deletions

View File

@ -56,4 +56,10 @@ augroup numbertoggle
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu | set rnu | endif
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
augroup END
" highlight yanked region, see `:h lua-highlight`
augroup highlight_yank
autocmd!
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
augroup END
"}

View File

@ -283,9 +283,6 @@ Plug 'mattn/emmet-vim'
"}}
"{{ Misc plugins
" Highlight yanked region
Plug 'machakann/vim-highlightedyank'
" Modern matchit implementation
Plug 'andymass/vim-matchup'
@ -813,13 +810,6 @@ let g:airline_highlighting_cache = 1
"}}
"{{ Misc plugin setting
""""""""""""""""""" vim-highlightedyank settings """"""""""""""
" Reverse the highlight color for yanked text for better visuals
highlight HighlightedyankRegion cterm=reverse gui=reverse
" Let highlight endures longer
let g:highlightedyank_highlight_duration = 1000
""""""""""""""""""""""""""""vim-matchup settings"""""""""""""""""""""""""""""
" Improve performance
let g:matchup_matchparen_deferred = 1