|
@@ -102,6 +102,27 @@ if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
|
|
endif
|
|
|
|
|
|
+" Start NERDTree and put the cursor back in the other window.
|
|
|
+"autocmd VimEnter * NERDTree | wincmd p
|
|
|
+
|
|
|
+" Start NERDTree. If a file is specified, move the cursor to its window.
|
|
|
+autocmd StdinReadPre * let s:std_in=1
|
|
|
+autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif
|
|
|
+
|
|
|
+" Exit Vim if NERDTree is the only window remaining in the only tab.
|
|
|
+autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
|
|
+
|
|
|
+" Show hidden files by default with NERDTree
|
|
|
+let NERDTreeShowHidden=1
|
|
|
+
|
|
|
+" Set airline theme
|
|
|
+" let g:airline_theme='cobalt2'
|
|
|
+let g:airline_theme='molokai'
|
|
|
+
|
|
|
+" Map NERDTree mapping
|
|
|
+nnoremap <leader>n :NERDTreeFocus<CR>
|
|
|
+nnoremap <C-n> :NERDTree<CR>
|
|
|
+
|
|
|
call plug#begin()
|
|
|
" Syntastic is a syntax checking plugin for Vim
|
|
|
Plug 'vim-syntastic/syntastic'
|
|
@@ -118,7 +139,7 @@ Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
|
|
Plug 'tpope/vim-repeat'
|
|
|
" EasyClip is a plugin for Vim which contains a collection of clipboard related functionality
|
|
|
"Plug 'svermeulen/vim-easyclip'
|
|
|
-" Powerlien for vim
|
|
|
+" Powerline for vim
|
|
|
Plug 'powerline/powerline'
|
|
|
" Terraform
|
|
|
Plug 'hashivim/vim-terraform'
|
|
@@ -128,6 +149,8 @@ Plug 'tpope/vim-commentary'
|
|
|
Plug 'ervandew/supertab'
|
|
|
" Markdown TOC
|
|
|
Plug 'mzlogin/vim-markdown-toc'
|
|
|
+" Nerdtree
|
|
|
+Plug 'preservim/nerdtree'
|
|
|
call plug#end()
|
|
|
|
|
|
" Integrate Powerline fonts
|