config.nvim/plugin/autocmd.lua

14 lines
284 B
Lua
Raw Permalink Normal View History

2024-11-11 22:17:41 -05:00
local autocmd = vim.api.nvim_create_autocmd
autocmd({ "TextYankPost" }, {
pattern = "*",
callback = function()
vim.highlight.on_yank({
higroup = "IncSearch",
timeout = 50,
})
end,
})
autocmd({ "BufWritePre" }, { pattern = "*", command = [[%s/\s\+$//e]] })