path: root/vim/config/syntax.vim
diff options
authorTom Ryder <tom@sanctum.geek.nz>2018-05-31 10:07:26 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-05-31 10:12:13 +1200
commit8b579e948d20900df4957d30448be37dfc86ccef (patch)
tree3ba2fcdbb479fc472bfff100cd3ee6f9bcd346ae /vim/config/syntax.vim
parentff55e3cc3507b01698e0e886f9fc1e8379de1f82 (diff)
Junk detect_background.vim and thereby autoload
It's too complicated and confusing, and doesn't do enough to justify wrecking Vim's own logic for doing this sort of thing. Better to just say `:set background=dark` and be done with it. This is the only one of my inline plugins with an `autoload` file, so we can get rid of that, too. Not worth packaging/publishing to www.vim.org.
Diffstat (limited to 'vim/config/syntax.vim')
1 files changed, 5 insertions, 10 deletions
diff --git a/vim/config/syntax.vim b/vim/config/syntax.vim
index 2322db5b..a2186b1f 100644
--- a/vim/config/syntax.vim
+++ b/vim/config/syntax.vim
@@ -5,17 +5,12 @@ if has('syntax') && !has('g:syntax_on')
silent! syntax enable
silent! syntax sync minlines=100
- " If we can, detect a light background, but default to a dark one. This is
- " only because it's more likely the author of this configuration will be
- " using one.
- if v:version >= 701
- silent! let &background = detect_background#DetectBackground()
- else
- set background=dark
- endif
+ " 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 for dark backgrounds with 256 colors
- if &background ==# 'dark' && (has('gui_running') || &t_Co == 256)
+ " The 'sahara' colorscheme only works in the GUI or with 256 colors
+ if has('gui_running') || &t_Co >= 256
silent! colorscheme sahara