1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 18:38:00 +00:00

[neovim] remove unnecessary autocommand and replace it with an option

This commit is contained in:
Daniel Carrillo 2022-11-11 18:32:43 +01:00
parent 2d91bee816
commit c45cbb63a6
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 1 additions and 7 deletions

View File

@ -1,12 +1,5 @@
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
-- Fixes Autocomment
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
callback = function()
vim.cmd("set formatoptions-=cro")
end,
})
-- Highlight Yanked Text
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
callback = function()

View File

@ -40,6 +40,7 @@ vim.opt.fillchars.eob = " "
vim.opt.shortmess:append("c")
vim.opt.whichwrap:append("<,>,[,],h,l")
vim.opt.iskeyword:append("-")
vim.opt.formatoptions:remove({ "c", "r", "o" })
-- experimental
vim.opt.cmdheight = 0 -- Number of screen lines to use for the command-line