1、复制配置文件到本用户环境下,再新建一个.vim文件夹,并创建bundle子文件夹
sudo cp /etc/vim/vimrc /home/wangy/.vimrc
sudo mkdir /home/wangy/.vim
sudo mkdir /home/wangy/.vim/bundle
sudo mkdir /home/wangy/.vim/bundle/vundle
bundle的配置文件如下:
"新增的配置放在这里 set nocompatible " be iMproved filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " My Bundles here: " " original repos on github Bundle 'tpope/vim-fugitive' Bundle 'Lokaltog/vim-easymotion' Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} Bundle 'tpope/vim-rails.git' " vim-scripts repos Bundle 'L9' Bundle 'FuzzyFinder' " non github repos " Bundle 'git://git.wincent.com/command-t.git' " Bundle 'https://github.com/scrooloose/nerdtree.git' " ... filetype plugin indent on " required! " " Brief help -- 此处后面都是vundle的使用命令 " :BundleList - list configured bundles " :BundleInstall(!) - install(update) bundles " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles " " see :h vundle for more details or wiki for FAQ " NOTE: comments after Bundle command are not allowed..
2、安装NERDTree
Bundle 'https://github.com/scrooloose/nerdtree.git'
用法如下:
nmap <F5> :NERDTree<CR> 快捷键
:NERDTree 开启
ctrl+w 可以在左右窗口切换
p 到上层目录,P到根目录
o 打开文件或目录,q 退出插件
3、安装tagbar
首先安装ctags,sudo apt-get install ctags
Bundle 'https://github.com/majutsushi/tagbar.git'
配置文件如下:
" tagbar设置---------------- " 快捷键 nmap <F4> :TagbarToggle<CR> let g:tagbar_width = 20 " tagbar's width, default 20 " let g:tagbar_left = 1 " on the left side let g:tagbar_right = 1 " on the right side let NERDTreeIgnore=['\.pyc', '\.pyo', '\.swp', '\~'] " ignore *.py[co], *.sw p and *~使用方式F4快捷键,退出为q
4、其他插件
Bundle 'https://github.com/scrooloose/nerdtree.git'
Bundle 'https://github.com/majutsushi/tagbar.git'
Bundle 'https://github.com/terryma/vim-multiple-cursors.git'
Bundle 'https://github.com/upsuper/vim-colorschemes.git'
Bundle 'https://github.com/vim-scripts/cppcomplete.git'