diff --git a/.config/nvim/lua/erik/options.lua b/.config/nvim/lua/erik/options.lua index ac92e21..5e44f13 100644 --- a/.config/nvim/lua/erik/options.lua +++ b/.config/nvim/lua/erik/options.lua @@ -14,18 +14,11 @@ vim.opt.clipboard = "unnamedplus" -- yank to system clipboard -- from my original vimrc vim.opt.expandtab = true --- formatoptions --- https://vimdoc.sourceforge.net/htmldoc/change.html#fo-table --- my original was cqr: --- c: Auto-wrap comments using textwidth, inserting the current comment leader automatically. --- q: Allow formatting of comments with "gq". --- r: Automatically insert the current comment leader after hitting in Insert mode. --- default is jcroql: --- j: (nvim) Where it makes sense, remove a comment leader when joining lines. --- o: Automatically insert the current comment leader after hitting 'o' or 'O' in Normal mode. --- l: Long lines are not broken in insert mode: When a line was longer than 'textwidth' when the insert command started, Vim does not automatically format it. --- --- the defaults seem fine +-- :help fo-table + +vim.opt.formatoptions:prepend ( "c" ) +vim.opt.formatoptions:prepend ( "q" ) +vim.opt.formatoptions:prepend ( "r" ) vim.opt.shiftwidth = 4 vim.opt.tabstop = 4