Tip #396: Highlighting whitespaces at end of line
tip karma |
Rating 21/14, Viewed by 543
|
created: |
|
January 9, 2003 19:04 |
|
complexity: |
|
basic |
author: |
|
Dubhead |
|
as of Vim: |
|
6.0 |
Whitespace characters (tabs, spaces, etc) at end of line are rarely meant to be there; they are usually there by accident. If you don't want them, maybe it pays to highlight them with an alarming color. (After all, GNU Emacs has it (show-trailing-whitespace), so why not in vim :-) )
Put this in your ~/.vimrc to highlight the whitespace characters at end of line:
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
<<visual marks |
mapping for better browsing of :help docs >>
Additional Notes
|