aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload
diff options
context:
space:
mode:
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/autoload
parentMerge branch 'release/v0.36.0' into develop (diff)
downloaddotfiles-8b579e948d20900df4957d30448be37dfc86ccef.tar.gz
dotfiles-8b579e948d20900df4957d30448be37dfc86ccef.zip
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/autoload')
-rw-r--r--vim/autoload/detect_background.vim37
1 files changed, 0 insertions, 37 deletions
diff --git a/vim/autoload/detect_background.vim b/vim/autoload/detect_background.vim
deleted file mode 100644
index e4163a43..00000000
--- a/vim/autoload/detect_background.vim
+++ /dev/null
@@ -1,37 +0,0 @@
-"
-" detect_background.vim: Invert Vim's built-in logic for choosing dark or
-" light backgrounds; we'll default to choosing a dark background unless we
-" find some reason *not* to.
-"
-" Return the string to which we think the option should be set, to allow the
-" caller to use it as they see fit.
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz>
-" License: Same as Vim itself
-"
-if exists('g:loaded_detect_background') || &compatible
- finish
-endif
-let g:loaded_detect_background = 1
-
-" Declare autoload function for 'background' set
-function! detect_background#DetectBackground() abort
-
- " Split up the value of $COLORFGBG (if any) by semicolons
- let l:colorfgbg = split($COLORFGBG, ';')
-
- " Get the background color value, or an empty string if none
- let l:bg = len(l:colorfgbg)
- \ ? l:colorfgbg[-1]
- \ : ''
-
- " Choose the background setting based on this value
- if l:bg ==# 'default'
- \ || l:bg == 7
- \ || l:bg == 15
- return 'light'
- else
- return 'dark'
- endif
-
-endfunction