From fe9a7b16519b7873b8c7c917c34801d77ec3770c Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sun, 21 Aug 2022 15:06:09 +0530 Subject: [PATCH] core|options: Add formatoptions in options | Remove unnecessary autocmd --- lua/core/init.lua | 6 ------ lua/core/options.lua | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 0e30564..95dfd5f 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -42,12 +42,6 @@ autocmd("BufUnload", { end, }) --- Don't auto commenting new lines -autocmd("BufEnter", { - pattern = "*", - command = "set fo-=c fo-=r fo-=o", -}) - -- store listed buffers in tab local var vim.t.bufs = vim.api.nvim_list_bufs() diff --git a/lua/core/options.lua b/lua/core/options.lua index 30ec75e..ee86d75 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -55,6 +55,9 @@ opt.updatetime = 250 -- when cursor reaches end/beginning of line opt.whichwrap:append "<>[]hl" +-- auto-wrap comments, don't auto insert comment on o/O and enter +opt.formatoptions:remove "cro" + g.mapleader = " " -- disable some builtin vim plugins