2017-08-01 23:06:24 -04:00
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
Plug 'vim-airline/vim-airline'
|
2017-08-02 00:19:14 -04:00
|
|
|
Plug 'vim-airline/vim-airline-themes'
|
|
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
2017-08-01 23:06:24 -04:00
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" general config
|
|
|
|
set number
|
|
|
|
|
|
|
|
" Allow saving files as root when vim was launched as user
|
|
|
|
cmap w!! w !sudo tee > /dev/null %
|
|
|
|
|
|
|
|
" vim-airline configuration
|
|
|
|
set laststatus=2
|
|
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
let g:airline#extensions#tabline#enabled = 1
|
2017-08-02 00:19:14 -04:00
|
|
|
let g:webdevicons_enable_airline_statusline = 1
|
2017-08-02 00:56:12 -04:00
|
|
|
let g:airline_theme='term'
|
2017-08-02 00:19:14 -04:00
|
|
|
|
|
|
|
" nerdtree configuration
|
|
|
|
map <C-n> :NERDTreeToggle<CR>
|
|
|
|
" auto open tree if used on directory
|
|
|
|
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
|
|
|
|
" auto close if only remaining window is tree
|
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|