masukomi / vim-markdown-folding

Fold markdown documents by section.
248 stars 43 forks source link

Add support for markdown variants such as API Blueprint #29

Closed b1f6c1c4 closed 5 years ago

b1f6c1c4 commented 6 years ago

:set filetype=markdown may be a workaround, but I wonder if there is a better way to do that.

masukomi commented 5 years ago

I'm a little torn on this. On the one hand it's not markdown. On the other hand it looks like the only difference is the use of a + instead of - or * or 1.

The bigger concern for me is that this plugin doesn't currently have a concept of lists, and definitely no concept of nested lists and that seems to be the key to API Blueprint. So, adding "support" for API Blueprint would be a bit disingenuous.

I think for now the right solution is to just configure your vim to use "markdown" as the default filetype whenever it opens an API Blueprint file. You can do this in your ~/.vim/filetype.vim file. I don't know what the file extension is for API Blueprint but here's an example that teaches vim how to handle .groovy files

au BufNewFile,BufRead   *.groovy setf groovy

In your case it would end with setf markdown and then you wouldn't have to manually set it every time you opened a file.