diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-11-28 16:31:56 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-11-28 16:31:56 +0100 |
commit | 4251d8d628331a7733276eec50b9f31cb792a7ca (patch) | |
tree | c75f855fd54a202c4fa1be512cbd41fcc3c00d33 /vim | |
parent | e30949db43ba188342717792bc6783ffabf0ecf5 (diff) |
vimrc: fix trailing whitespace highlighting
Move the color setting itself to the color theme (which clears
highlighting at the beginning, thus breaking highlighting).
Move the match declaration after setting the color theme.
Diffstat (limited to 'vim')
-rw-r--r-- | vim/inkpot.vim | 2 | ||||
-rw-r--r-- | vim/vimrc | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/vim/inkpot.vim b/vim/inkpot.vim index 556efd4..59d8bcd 100644 --- a/vim/inkpot.vim +++ b/vim/inkpot.vim @@ -200,6 +200,8 @@ else exec "hi Underlined cterm=BOLD ctermfg=" . <SID>X(77) . " ctermbg=" . "NONE" exec "hi TaglistTagName cterm=BOLD ctermfg=" . <SID>X(39) . " ctermbg=" . "NONE" + hi WhiteSpaceEOL ctermbg=darkgreen + if v:version >= 700 exec "hi Pmenu cterm=NONE ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(82) exec "hi PmenuSel cterm=BOLD ctermfg=" . <SID>X(87) . " ctermbg=" . <SID>X(38) @@ -34,10 +34,6 @@ set tabstop=4 set mouse=a set ttymouse=sgr -" trailing whitespace highlighting -highlight WhiteSpaceEOL ctermbg=darkgreen -match WhiteSpaceEOL /\s\+$/ - " put all the vim files under ~/.vim to avoid polluting the rest of the " filesystem with them set dir=~/.cache/vim/swap @@ -52,6 +48,9 @@ else colorscheme inkpot endif +" trailing whitespace highlighting +match WhiteSpaceEOL /\s\+$/ + " extension-based filetypes let filetype_m="mma" let filetype_par="config" |