1
0
mirror of https://github.com/xlogerais/config-vim synced 2024-11-10 00:21:41 +01:00

Added nerdtree preferences

This commit is contained in:
Xavier Logerais 2015-03-01 22:13:59 +01:00
parent 6991d436e4
commit 869993c2f9
2 changed files with 16 additions and 6 deletions

9
prefs/nerdtree.vim Normal file
View File

@ -0,0 +1,9 @@
" NERDTree shortcut
map <C-n> :NERDTreeToggle<CR>
" open a NERDTree automatically when vim starts up if no files were specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif

13
vimrc
View File

@ -10,6 +10,8 @@ set ttyfast
execute pathogen#infect()
source prefs/nerdtree.vim
" ------[ Gestion de la barre de statut ] ----------------------------------------------
" Display title
@ -124,20 +126,19 @@ elseif (&term =~ 'rxvt')
map <C-down> :tabl<cr>
map <C-t><left> :tabp<cr>
map <C-t><right> :tabn<cr>
elseif (&term =~ 'screen-256color')
set termencoding=utf-8
set t_Co=256
set mouse=a
colorscheme mustang
elseif (&term =~ 'screen')
set termencoding=utf-8
set t_Co=16
set background=dark
colorscheme zenburn
elseif (&term =~ 'screen-256color')
set termencoding=utf-8
set t_Co=256
set mouse=a
colorscheme mustang
elseif (&term =~ 'linux')
set termencoding=utf-8
set t_Co=16
set nocursorline
else
set termencoding=utf-8
set t_Co=16