aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorclaw0ry <me@claw0ry.net>2024-12-23 09:53:59 +0100
committerclaw0ry <me@claw0ry.net>2024-12-23 09:53:59 +0100
commit8988b6a44febca5bb0d1d08bc1d43f7d2d2697ba (patch)
tree890a85d62c0474e4307ab5f633f46f24271fe970 /.vimrc
parentpowershell: silently load modules and check if non-standard commands exist (diff)
vim: highlight extra whitespace
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index a7d495b..037f0ff 100644
--- a/.vimrc
+++ b/.vimrc
@@ -153,3 +153,10 @@ call plug#end()
set background=dark
colorscheme habamax
+
+" highlight extra whitespace
+highlight ExtraWhitespace ctermbg=red guibg=red
+autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
+autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+autocmd InsertLeave * match ExtraWhitespace /\s\+$/
+autocmd BufWinLeave * call clearmatches()