作用:可以使markdown語法高亮。
1.安裝。使用pathogen插件管理。
cd ~/.vim/bundle
git clone https://github.com/plasticboy/vim-markdown.git
2.配置,安裝完成后,由pathogen自動生效,但是markdown寫Jekyll博客,需要對yaml語法做個配置。在~/.vimrc中添加以下配置:
let g:vim_markdown_frontmatter=1
3.markdown代碼補全工具snipMate
cd ~/.vim/bundle
git clone https://github.com/tomtom/tlib_vim.git
git clone https://github.com/MarcWeber/vim-addon-mw-utils.git
git clone https://github.com/garbas/vim-snipmate.git
git clone https://github.com/honza/vim-snippets.git
其中tlib_vim和vim-addon-mw-utils是2個函數庫,vim-snippets是編輯代碼片段用的,可以不裝,但是你要是自定義snipmate的行為就用的找了。
4.沖突:vim-markdown和vim-snipmate無法自動配合使用,目前(2016.6.13)看來是因為前者將filetype設置為mkd,而后者需要filetype為markdown才能夠生效。
解決方法:
cd ~/.vim/bundle/vim-snippets
cp markdown.snippets mkd.snippets
5.更多語法參見官網。https://github.com/plasticboy/vim-markdown