热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

MarkDown的vim插件安装

作用:可以使markdown语法高亮。1.安装。使用pathogen插件管理。cd~.vimbundlegitclonehttps:github.complasticb

作用:可以使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


推荐阅读
author-avatar
夕阳的春天8989_110
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有