From 4251d8d628331a7733276eec50b9f31cb792a7ca Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 28 Nov 2020 16:31:56 +0100 Subject: 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. --- vim/inkpot.vim | 2 ++ vim/vimrc | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'vim') 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=" . X(77) . " ctermbg=" . "NONE" exec "hi TaglistTagName cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" + hi WhiteSpaceEOL ctermbg=darkgreen + if v:version >= 700 exec "hi Pmenu cterm=NONE ctermfg=" . X(87) . " ctermbg=" . X(82) exec "hi PmenuSel cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) diff --git a/vim/vimrc b/vim/vimrc index b6f2f5c..a706441 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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" -- cgit v1.2.3