lkml.org 
[lkml]   [2007]   [Jun]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromKyle Moffett <>
Subject[OT] Vim highlighting for trailing spaces
DateThu, 28 Jun 2007 23:11:51 -0400
On Jun 28, 2007, at 03:20:24, Dave Young wrote:
> And for vim trailing space, there's a tip in vim.org:
> http://www.vim.org/tips/tip.php?tip_id=878

I actually prefer this (in .vimrc):

" Show trailing whitespace and spaces before tabs
hi link localWhitespaceError Error
au Syntax * syn match localWhitespaceError /\(\zs\%#\|\s\)\+$/ display
au Syntax * syn match localWhitespaceError / \+\ze\t/ display
It always displays trailing whitespace and spaces-before tabs...  
except if your cursor is at the end of the whitespace.  The updating  
is occasionally a bit laggy (EG: Put spaces on a line and then move  
the cursor off it without pressing <ENTER>), but when you hit Ctrl-L,  
enter, or edit an adjacent line then it updates.

The script mentioned there *is* good for removing said whitespace,  
though

Cheers,
Kyle Moffett

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-29 03:15    [from the cache]
©2003-2008