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'
" ========================== " Plugin Place " ==========================
" All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required
" Start NERDTree and put the cursor back in the other window. " vim 打开时自动打开nerdtree但是不聚焦在nerd中 autocmd VimEnter * NERDTree | wincmd p
" Exit Vim if NERDTree is the only window remaining in the only tab. " 退出vim时如果只剩下nerdtree窗口,nerdtree也退出 autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree. " 防止nerdtree被替代,新窗口自动在nerd之外的窗口打开 autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | \ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
" F2 打开NERDTree map <F2> :NERDTreeToggle<CR> let NERDTreeWinSize=30 " 靠左显示 let NERDTreeWinPos="left"