Feature: blockquote (> ) better joining (J) and hard wrapping (Issue #915)

Wrap: autoadd a new `> ` on new create lines with `setlocal comments+=n:>`
Join: autoremove the inter `> ` with  `setlocal formatoptions+=j`
This commit is contained in:
Tinmarino
2020-07-26 17:55:47 -04:00
parent 536184c59b
commit d5964f0c84
4 changed files with 52 additions and 5 deletions

View File

@ -117,15 +117,26 @@ setlocal omnifunc=Complete_wikifiles
" Declare settings necessary for the automatic formatting of lists
" ------------------------------------------------
setlocal autoindent
setlocal nosmartindent
setlocal nocindent
setlocal comments=""
" Set comments: to insert and format 'comments' or cheat
setlocal comments=
" Used to break blockquote prepending one on each new line (see: #915)
setlocal comments+=n:>
" Set format options (:h fo-table)
setlocal formatoptions-=c
setlocal formatoptions-=r
setlocal formatoptions-=o
setlocal formatoptions-=2
setlocal formatoptions+=n
" Used to join blockquotes (see: #915)
if v:version > 703
setlocal formatoptions+=j
endif
let &formatlistpat = vimwiki#vars#get_wikilocal('rxListItem')