" Install vim-plug if not found if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif " Run PlugInstall if there are missing plugins autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | source $MYVIMRC \| endif call plug#begin() Plug 'preservim/nerdtree' Plug 'vim-airline/vim-airline' Plug 'tpope/vim-fugitive' Plug 'xuyuanp/nerdtree-git-plugin' call plug#end() nnoremap :tabnew nnoremap :tabclose nnoremap :tabprevious nnoremap :tabnext nnoremap W nnoremap w nnoremap 5+ nnoremap 5- nnoremap 5< nnoremap 5> nnoremap :vsplit nnoremap :q autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif " nnoremap :NERDTree nnoremap :NERDTreeFocus set list listchars=tab:>-,trail:.,extends:> set tabstop=2 set shiftwidth=2 set softtabstop=2 set expandtab