diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-20 21:55:32 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-20 21:55:32 +1200 |
commit | 29bd85016d16e3b48de35dc904b651f59bedda91 (patch) | |
tree | baa0b14b280cf0de20e567626447eb9376405a6c /vim | |
parent | Remove some unneeded silencing (diff) | |
download | dotfiles-29bd85016d16e3b48de35dc904b651f59bedda91.tar.gz dotfiles-29bd85016d16e3b48de35dc904b651f59bedda91.zip |
Refine colorscheme selection logic
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -29,15 +29,17 @@ if has('syntax') && !has('g:syntax_on') " Use syntax highlighting syntax enable - " Opinionated; if the author is using color at all, it will probably be with - " a dark background - set background=dark - - " The 'sahara' colorscheme only works in the GUI or with 256 colors + " Use the 'sahara' colorscheme if using the GUI or if we have 256 colors if has('gui_running') || &t_Co >= 256 silent! colorscheme sahara endif + " If we couldn't use 'sahara', just flag a dark background (the author is + " almost certainly using one), and we'll use the default colorscheme + if !exists('g:colors_name') || g:colors_name != 'sahara' + set background=dark + endif + endif " Let me backspace over pretty much anything |