diff options
author | claw0ry <me@claw0ry.net> | 2025-01-21 16:00:59 +0100 |
---|---|---|
committer | claw0ry <me@claw0ry.net> | 2025-01-21 16:00:59 +0100 |
commit | b52de610e0584739aa09d425521b7e4f1cfe42cd (patch) | |
tree | 80bcdd4c389de6b56e3d790952ee3961f608e2d9 /.vimrc | |
parent | vim: keybinding for copying filename (diff) |
vim: highlight nbsp (\xa0) and force white fg on ExtraWhitespace
In addition to highlighting trailing whitespace it also highlights the
NBSP character (\xa0). This character is easily mistyped on MacOS.
As an extra improvement it force ExtraWhitespace foreground highlighting
to be white.
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -183,8 +183,8 @@ set background=dark colorscheme habamax " highlight extra whitespace -highlight ExtraWhitespace ctermbg=red guibg=red -autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +highlight ExtraWhitespace ctermbg=red guibg=red ctermfg=white guifg=white +autocmd BufWinEnter * match ExtraWhitespace /\s\+$\|\%xA0/ autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ -autocmd InsertLeave * match ExtraWhitespace /\s\+$/ +autocmd InsertLeave * match ExtraWhitespace /\s\+$\|\%xA0/ autocmd BufWinLeave * call clearmatches() |