From 79d6eef63ff4984fa3f8631aec6da26fa19a6f34 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Nov 2017 20:16:43 +1300 Subject: Adjust plugin code layout a lot Including renaming big_file.vim and accompanying functions yet again, to big_file_options.vim. Trying to keep complex autocmd and mapping definitions on long lines broken up semantically; definition and options on one line, patterns or mapping key on the next, and the command to run on the last. Also trying to make sure that , , and are applied in the correct places, and that all mapping commands are using the : idiom for the command prefix. --- vim/autoload/detect_background.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vim/autoload') diff --git a/vim/autoload/detect_background.vim b/vim/autoload/detect_background.vim index 89e5d19e..5dd9218c 100644 --- a/vim/autoload/detect_background.vim +++ b/vim/autoload/detect_background.vim @@ -12,10 +12,14 @@ function! detect_background#DetectBackground() 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] : '' + 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' + if l:bg ==# 'default' + \ || l:bg ==# '7' + \ || l:bg ==# '15' set background=light else set background=dark -- cgit v1.2.3