I want comment continuation!

This commit is contained in:
Erik Stambaugh 2024-06-18 08:22:47 -07:00
parent 96372bd1de
commit 153a9068ea

View file

@ -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 <Enter> 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