Wednesday, April 22, 2009

vim: trailing spaces

Part of our coding standards is the absolute prejudice against trailing whitespace.

I often run the following vim regex to look for such creatures:


Even better yet, add the following to your vimrc to show you where these pesky creatures live:

syntax match ToDo /\s\+$/

Note: I used ToDo out of personal taste. Some people might prefer to use Error. :)

PS. Related post: vim: How To Highlight Unwanted Spaces

No comments: