From c018c96859aa4da0547c58206d2008dc61c17deb Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Mon, 8 Nov 2021 14:51:54 +0100 Subject: [PATCH] vim: fix formatlistpat The previous format for some reason was causing problems when wrapping comments in files with ft=sh. This new pattern seems to fix the issue while keeping the old functionality. --- nvim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index 2172924..ff4a6e6 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -18,7 +18,7 @@ set foldenable " enable folding set foldlevelstart=100 " start with all folds open set foldmethod=syntax " fold based on syntax by default set foldnestmax=10 " limit nested folds to 10 levels -set formatlistpat="^\s*\(\d\+[\]:.)}\t ]\|[-*]\|\[[ x]\]\|([ x])\)\s*" +let &formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[-+*]\|[\[(][ x][\])]\)\s*' set formatoptions-=t " don't auto-wrap on 'textwidth'... set formatoptions+=c " ... but do it within comnment blocks. set formatoptions+=r " insert comment leader when pressing Enter...