1
0
Fork 0
This commit is contained in:
zymon 2024-08-25 16:06:58 +02:00
parent 50dfcd9bd8
commit 38fd1b675e
2 changed files with 17 additions and 0 deletions

View file

@ -14,3 +14,4 @@ vim.opt.rtp:prepend(lazypath)
require("znvim.options") require("znvim.options")
require("lazy").setup("znvim.plugins") require("lazy").setup("znvim.plugins")
require("znvim.keymaps") require("znvim.keymaps")
require("znvim.autocmds")

16
lua/znvim/autocmds.lua Normal file
View file

@ -0,0 +1,16 @@
vim.api.nvim_create_autocmd("TextYankPost", { -- highlight yanked characters
callback = function()
vim.highlight.on_yank({ timeout = 250 })
end
})
vim.api.nvim_create_autocmd("FileType", { -- close some filetypes with <q>
pattern = {
"help",
"man",
},
callback = function(event)
vim.bo[event.buf].buflisted = false
vim.keymap.set("n", "q", "<cmd>quit<cr>", { buffer = event.buf, silent = true })
end,
})