做用:能夠使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
git