less than 1 minute read

I have a bad habit of visually selecting text in (neo)vim before yanking it. I know that it’s not efficient and always wanted to get rid of this habit.

Neovim has merged cool PR that I hope could help me - hightlight on yank.

If you’re on Neovim v0.5.0-519+, you can set up something like:

" Highlight yanked text in neovim
if exists('##TextYankPost')
    autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank('IncSearch', 1500)
endif

To achieve: TextYankPost

Tags:

Categories:

Updated:

Comments