diff --git a/vimrc b/vimrc index 9995640..6ee3bb9 100644 --- a/vimrc +++ b/vimrc @@ -30,7 +30,12 @@ " For all default colorschemes, see `ls -l /usr/share/vim/vim*/colors/` " For extra colorschemes, see `ls -l ~/.vim/colors` set t_Co=256 " for tmux 256 colors -colorscheme codedark " default colorscheme +if filereadable ($HOME."/.vim/colors/codedark.vim") + colorscheme codedark " codedark colorscheme if available + let g:HLColorScheme = g:colors_name +else + colorscheme default " default colorscheme +endif set background=dark syntax on " activation de la coloration syntaxique set number " numérotation des lignes @@ -928,7 +933,6 @@ autocmd BufWritePre * :%s/\s\+$//e " Search for 2 whitespaces and highlight it (red and underline) set hls let g:HLSpace = 1 -let g:HLColorScheme = g:colors_name function! ToggleSpaceUnderscoring() if g:HLSpace highlight Search cterm=underline gui=underline ctermbg=red ctermfg=none