vim icon indicating copy to clipboard operation
vim copied to clipboard

Trailing whitespace visibility

Open dbatten5 opened this issue 5 years ago • 2 comments

Is there a way to make trailing whitespace a bit more visible? It's quite difficult to spot it at a glance:

image

dbatten5 avatar Nov 28 '20 14:11 dbatten5

ok found a solution to this:

augroup nord_theme_overrides
  autocmd!
  autocmd ColorScheme nord highlight ExtraWhitespace guifg=#88C0D0
  autocmd ColorScheme nord match ExtraWhiteSpace /\S\(\s\+\)$/
augroup END

happy to hear if there is a better way though

dbatten5 avatar Nov 29 '20 18:11 dbatten5

Hi @dbatten5 :wave:

Using autocmd groups is the recommended way to customize Nord Vim. Defining a custom highlighting group like you did is one way to match only specific tokens. To change the color for all non-printable characters (listchars), you can customize the SpecialKey group:

augroup nord-theme-overrides
  autocmd!
  " Use 'nord8' as foreground color for non-printable characters.
  autocmd ColorScheme nord highlight SpecialKey ctermfg=6 guifg=#88C0D0
augroup END

arcticicestudio avatar Apr 28 '21 21:04 arcticicestudio