Re: [OT] Vim highlighting for trailing spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jun 29, 2007, at 08:49:42, Dmitry Torokhov wrote:
On 6/29/07, Michael Tokarev <[email protected]> wrote:
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/

Works without any glitches here (not "laggy"). But I don't use syntax coloring - never tried if it works with coloring or not.


That only highlights whitespace at the end of the lines. You might want to use pattern below to also highlight "tab after space" in the middle of the line:

:highlight RedundantSpaces ctermbg=red guibg=red
:match RedundantSpaces /\s\+$\| \+\ze\t/

You missed the nice part about my vimrc patterns: :-D

Kyle Moffett wrote:
It always displays trailing whitespace and spaces-before tabs... except if your cursor is at the end of the whitespace.

They intentionally *don't* display whitespace at the end of the line to the left of your cursor. I tried that one (that you quoted), but got annoyed by the fact that immediately after you typed any space or tab you had a little red blob to the left of the cursor. So some of that "lagginess" is intentionaly (although not all of it, due to vim limitations).

Cheers,
Kyle Moffett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux