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.
This commit is contained in:
Fernando Schauenburg 2021-11-08 14:51:54 +01:00
parent 5805ab5e5f
commit c018c96859

View file

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