bronson / vim-trailing-whitespace

Highlights trailing whitespace in red and provides :FixWhitespace to fix it.
453 stars 62 forks source link

Should we highlight spaces that are preceeded by a backslash? #12

Closed hugomg closed 8 years ago

hugomg commented 9 years ago

Right now, vim-trailing-whitespace is complaining about the trailing space in the following line in my .vimrc:

set showbreak=↪\ \ \ 

However, the final space, after the third backslash, is part of the value that I am assigning to showbreak. Perhaps the whitespace-detection regexes should allow whitespace if it is preceded by a backslash?

/\s\+$/        " Current regex
/\\\@<!\s\+$/  " Proposed regex
bronson commented 9 years ago

That's a good point. Feel like trying it out and sending a PR if you like it?

bronson commented 8 years ago

Fixed by #13, I'm glad you persisted.