From 1075264593d9534ab8d54daf1aa1c8d511656e15 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 11 Jul 2024 18:57:02 +0200 Subject: [PATCH] vim:setts: Add `/` to 'formatoptions' Do not insert the comment leader on 'o' on trailing inline comments. --- .config/vim/vimrc.d/30-settings.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/vim/vimrc.d/30-settings.vim b/.config/vim/vimrc.d/30-settings.vim index 1deaba2..d3a2fa3 100644 --- a/.config/vim/vimrc.d/30-settings.vim +++ b/.config/vim/vimrc.d/30-settings.vim @@ -25,10 +25,8 @@ set ignorecase smartcase set tabstop=4 " Shift the same amount as tabstop set shiftwidth=0 -" Auto-wrap text and comments; automatically add comment leader when creating -" new lines and delete it when joining; do not break already too long lines; -" allow formatting with gq. Recognize numbered lists when formatting. -set formatoptions=tcroqljn +" Control how vim formats paragraphs. See :h fo-table +set formatoptions=tcro/qlnj " Autoindent new lines set autoindent " Copy structure of the existing lines indent when autoindenting a new line