summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-28 10:17:43 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-28 10:17:43 +0100
commitcf1103331bbc6157060675b15820d32a0b49e025 (patch)
treeb938b30397001a41d66378aea15edff846d5f082
parentcfb55a77ab09734dcb6ccedd862390d539b094cc (diff)
vimrc: improve trailing whitespace matching
Make it work in windows beyond the first one.
-rw-r--r--vim/vimrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 735e0e0..cf97de2 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -65,7 +65,10 @@ else
endif
" trailing whitespace highlighting
-match WhiteSpaceEOL /\s\+$/
+augroup vimrc
+ autocmd!
+ autocmd VimEnter,WinNew * call matchadd('WhiteSpaceEOL', '\s\+$')
+augroup END
" extension-based filetypes
let filetype_m="mma"