Why are my bulleted lines automatically joining?

2018-06-01 21:45:00

I use the a formatoption to make my text hard wrap, and the n formatoption to recognize numbered lists. The help says that the n option should use the formatlistpat regex to determine which lines not to mess with, but it doesn't seem to be working for me; vim is joining all my bulleted lines.

These are the values of my options:

formatoptions=tqlran

textwidth=65

formatlistpat=^\s*\d\+\.\s\+\|^[-*+]\s\+\|^\[^\ze[^\]]\+\]:

filetype=markdown

Also, formatlistpat was "Last set from usr/local/Cellar/vim/8.0.1650_1/share/vim/vim80/ftplugin/markdown.vim", so I know it's not just a matter of me not escaping the regex correctly when setting it.

An example of the bad behavior can be seen in this video.

Any idea how I can make vim stop joining lines like this?