diff options
| author | jdhao <jdhao@hotmail.com> | 2020-09-19 16:34:20 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2020-09-19 16:34:20 +0800 |
| commit | ec64c3237a55fc83f68a0685bcdab1a74dd4ddb7 (patch) | |
| tree | 83f43e717c180b493874dd5055f82854d98b410b /autocommands.vim | |
| parent | f0abb3481aa24a25acf24b4fb543a0a6d95e3c75 (diff) | |
use internal yank highlight instead of plugins
Diffstat (limited to 'autocommands.vim')
| -rw-r--r-- | autocommands.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/autocommands.vim b/autocommands.vim index f46a06c..1a40a0f 100644 --- a/autocommands.vim +++ b/autocommands.vim @@ -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 "} |
