git
git
的clone
命令,所以需要这个;之前我用的cygwin
的git
,一直路径出错就索性直接下了git
。git clone https://github.com/VundleVim/Vundle.vim.git D:/App/Vim/vimfiles/bundle/Vundle.vim
_vimrc
set rtp+=$VIM/vimfiles/bundle/vundle/
call vundle#rc('$VIM/vimfiles/bundle/')
Bundle 'gmarik/vundle'
:BundleList 列举出列表中(.vimrc中)配置的所有插件
:BundleInstall 安装列表中全部插件
:BundleInstall! 更新列表中全部插件
:BundleSearch foo 查找foo插件
:BundleSearch! foo 刷新foo插件缓存
:BundleClean 清除列表中没有的插件
:BundleClean! 清除列表中没有的插件
_vimrc
文件里面写上相应的字符即可Bundle 'scrooloose/nerdtree'
Vim
,再打开,输入命令:BundleInstall
,等待安装结束。NERDTree
热键,下面是用F2
与Ctrl+t
,只用一个即可 map :NERDTreeToggle
map :NERDTreeToggle
NERDTree
在窗口的位置,默认在左边 let NERDTreeWinPos='left'
NERDTree
宽度 let NERDTreeWinSize=30
Vim
时,NERDTree
自动启动 autocmd vimenter * NERDTree
Vim
时,如果没有指定要打开的文件,就启动NERDTree
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
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')
Bundle 'bling/vim-airline'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
let g:vim_markdown_folding_disabled = 0 " vim-markdown 1-不折叠;0-折叠
Bundle 'Solarized'
Bundle 'molokai'
colorscheme molokai " 设置主题
set background=dark " 设置背景