split out vim config
This commit is contained in:
parent
3224136dab
commit
e0a1ba6ad9
6 changed files with 168 additions and 136 deletions
20
lua/custom/config/api.lua
Normal file
20
lua/custom/config/api.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue