Load codedark colorscheme only if available

This commit is contained in:
gardouille 2022-07-26 17:41:23 +02:00
parent d68429505a
commit 681a546eb7
Signed by: gardouille
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 2 deletions

8
vimrc
View File

@ -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