21 lines
688 B
Lua
21 lines
688 B
Lua
vim.api.nvim_create_autocmd({ 'BufWinEnter' }, {
|
|
group = vim.api.nvim_create_augroup('custom-cursor-remember', { clear = true }),
|
|
desc = 'return cursor to where it was last time closing the file',
|
|
pattern = '*',
|
|
command = 'silent! normal! g`"zv',
|
|
})
|
|
|
|
-- [[ Basic Autocommands ]]
|
|
-- See `:help lua-guide-autocommands`
|
|
|
|
-- Highlight when yanking (copying) text
|
|
-- Try it with `yap` in normal mode
|
|
-- See `:help vim.highlight.on_yank()`
|
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
desc = 'Highlight when yanking (copying) text',
|
|
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
|
callback = function()
|
|
vim.highlight.on_yank()
|
|
end,
|
|
})
|