Vundle - 配置好你的Vim(前端开发)
2015-10-28 01:58
190 查看
Vundle
Vundle 是一个 Vim 的插件管理工具,类似于 Bundle 的功能。它可以让你通过配置.vimrc文件来安装多个 Vim 插件。
安装 Vundle
Vundle 代码 直接下载到你的 ~/.vim/bundle/ 目录下,通过脚本就是:[code]$ mkdir -p ~/.vim/bundle $ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
配置 Vundle
其实也是配置你的 Vim 如何起用 Vundle 以及安装哪些 Vim 插件。可以参考 Read Me 文档:https://github.com/VundleVim/Vundle.vim我的配置文件(前端开发)
重要的东西都在Plugin 'xxxx/xxxx'这样的依赖上,只要配置好这些依赖,再重新打开
~/.vimrc文件,执行
:PluginInstall命令,就可以安装 Vim 依赖了,待完成后会有 Done! 字样显示在 Vim 状态栏内。
这是我的
~/.vimrc文件全集:
[code]set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' " Plugins Plugin 'scrooloose/nerdtree' Plugin 'fholgado/minibufexpl.vim' Plugin 'Shutnik/jshint2.vim' Plugin 'leshill/vim-json' Plugin 'kchmck/vim-coffee-script' Plugin 'mislav/vimfiles' Plugin 'leafgarland/typescript-vim' Plugin 'tpope/vim-markdown' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-fugitive' Plugin 'marijnh/tern_for_vim' Plugin 'Xuyuanp/nerdtree-git-plugin' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required " To ignore plugin indent changes, instead use: "filetype plugin on " " Brief help " :PluginList - lists configured plugins " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate " :PluginSearch foo - searches for foo; append `!` to refresh local cache " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line " ------------------------------------------------------------ " Common " ------------------------------------------------------------ syntax on " ------------------------------------------------------------ " NERDTree " ------------------------------------------------------------ "NERDTree: autoload when startup vim autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif "NERDTree: C-n to open NERDTree map <C-n> :NERDTreeToggle<CR> " NERDTree: File highlighting function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' endfunction call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515') call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515') call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515') call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515') call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515') call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515') call NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515') call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515') " ------------------------------------------------------------ " NERDTree " ------------------------------------------------------------
相关文章推荐
- css3结构性伪类选择器
- css3属性选择器
- CSS3实现精美的纸张折角效果
- CSS3实现精美的纸张折角效果
- nodejs npm express windows 安装
- CSS3之文本阴影text-shadow
- css3 @font-face设置嵌入字体
- 理解HTML中的id属性和name属性
- CSS3文本超出容器显示省略号之text-overflow属性
- JS setInterval()、 setInterval()与 clearInterval() 方法的使用
- CSS3线性渐变和径向渐变
- PagerSlidingTab定制自己的样式
- .NET中JSON的序列化和反序列化
- Game of Life
- html标记语言的常用标签,表格
- html标记语言的常用标签一
- jsp+ajax实现的局部刷新较验验证码(onblur事件触发较验)
- jsp倒计时简单实现方法
- jQuery实现鼠标滑过链接控制图片的滑动展开与隐藏效果
- JavaScript如何调试有哪些建议和技巧附五款有用的调试工具