I use vim to write Markdown. When I type this:
1. test 2. test
Vim annoys and formats it like this:
My formatoptions( tqlna) includes n. File type markdown. The listpat format is as follows:
formatoptions
tqlna
n
markdown
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+
Some of them seem to work, because Vim understands that it should not reformat lists starting with -, *or +.
-
*
+
How can i fix this?
- want formatoptions, , . , . , w , , , . want, , , Vim .
want
w
: http://blog.ezyang.com/2010/03/vim-textwidth/
" fo = RST- . ."
, vim , +, * -. , vim ( gq ). a formatoptions vim , , .
gq
a
n formatlistpat, , textwidth . , gq, .
formatlistpat
textwidth
, formatprg, , . a . , a formatoptions gq .
formatprg
[-*+] . ,
[-*+]
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+