vimscript - How to eliminate once and for all the side effects of folding, expanding and syntax highlighting caused by vim-markdown on octopress markdown files?
ringa_lee
ringa_lee 2017-05-16 16:41:55
0
2
750

vim-markdown This plug-in will automatically set foldmethod=expr for files with filetype being mkd, which will use rake new_post The generated markdown file has the side effect of folding somewhere, expanding and syntax highlighting:

How to eliminate it once and for all without changing foldmethod? Thanks!

Updated: I expected that there would be no good solution, but I found a new plug-in vim-octopress that can replace vim-markdown. Not only does it not have the side effects of the former, but it also supports rakeCommand built-in. There is no need to dwell on this issue any longer.

ringa_lee
ringa_lee

ringa_lee

reply all(2)
大家讲道理

Look at the help documentation of vim-markdown. You should be able to disable vim-markdown by setting variables in .vimrc. You can even remove this plugin if you don't use it.

ps. vim itself also comes with a markdown plug-in, but it is limited to syntax highlighting.

Another method, for reference only: After opening the markdown file, :set ft=txt. Or add a vim modeline:

at the beginning or end of the markdown file that you don’t want to collapse and highlight.
<!-- vim: set ft=txt: -->

Not sure if it will work, give it a try. I haven't used vim for a long time.

小葫芦

You can try adding this line to .vimrc to disable markdown’s folding function:

autocmd BufNewFile,BufRead *.md set nofoldenable
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!