Change for format options to disable auto comment

vim.cmd [[set formatoptions-=cro]] -- TODO: this doesn't seem to work

Found that using the formatoptions in form of a table, and setting the options to false fixes the setting for -cro.
pull/200/head
Luan 2 years ago committed by GitHub
parent 24e1856862
commit 88a4c6ae6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,6 +33,11 @@ local options = {
scrolloff = 8, -- is one of my fav scrolloff = 8, -- is one of my fav
sidescrolloff = 8, sidescrolloff = 8,
guifont = "monospace:h17", -- the font used in graphical neovim applications guifont = "monospace:h17", -- the font used in graphical neovim applications
formatoptions = {
c = false, -- Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode.
r = false, -- Automatically insert the current comment leader after hitting <Enter> in Insert mode.
o = false, -- Auto-wrap comments using textwidth, inserting the current comment leader automatically.
},
} }
vim.opt.shortmess:append "c" vim.opt.shortmess:append "c"
@ -43,4 +48,4 @@ end
vim.cmd "set whichwrap+=<,>,[,],h,l" vim.cmd "set whichwrap+=<,>,[,],h,l"
vim.cmd [[set iskeyword+=-]] vim.cmd [[set iskeyword+=-]]
vim.cmd [[set formatoptions-=cro]] -- TODO: this doesn't seem to work

Loading…
Cancel
Save