new auto-commands file

This commit is contained in:
Enrique MP 2023-10-06 23:48:20 +02:00
parent 9ed5b85a91
commit 3a3368aa87
2 changed files with 13 additions and 4 deletions

13
lua/emp/core/autocmd.lua Normal file
View File

@ -0,0 +1,13 @@
local cmd = vim.cmd -- execute vim commands
local ag = vim.api.nvim_create_autogroup -- create autogroup
local au = vim.api.nvim_create_autocmd -- create autocommand
-- don't autocommenting new lines
cmd([[au BufEnter * set fo-=c fo-=r fo-=o]])
-- highlight yanked text
au("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
})

View File

@ -1,4 +0,0 @@
local cmd = vim.cmd -- execute vim commands
-- don't autocommenting new lines
cmd([[au BufEnter * set fo-=c fo-=r fo-=o]])