My user config prefs
1-- [[ Basic Autocommands ]]
2-- See `:help lua-guide-autocommands`
3
4-- Highlight when yanking (copying) text
5-- Try it with `yap` in normal mode
6-- See `:help vim.highlight.on_yank()`
7vim.api.nvim_create_autocmd('TextYankPost', {
8 desc = 'Highlight when yanking (copying) text',
9 group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
10 callback = function()
11 vim.highlight.on_yank()
12 end,
13})
14
15-- vim: ts=2 sts=2 sw=2 et