Hi Tim!

On Do, 14 Mai 2009, Tim Chase wrote:

> I pondered a similar solution using :[2]match:
> 
>    :match Error / \+/
>    :2match WildMenu /\t\+/
> 
> (or they can be rolled into one
> 
>    :match Error /\s\+/
> 
> if you don't want to distinguish between them)
> 
> However what threw me was his "temporarily" aspect.  I don't know 
> of anything that clears on a cursor-move.  Both your 'list' 
> solution and my ":match" solutions persist until turned off. 

How about either :match WildMenu /\s\+$/ which highlights only as long 
as there is a whitespace Char before the end of the current line.  
This is actually not was asked for, but when typing text, this might 
be close enough.

Or you could use Jürgen's approach and enhance it to:

augroup WS
     au!
     au CursorMovedI * :match WildMenu /\s\+\%#\s*/
augroup END

which adds the benefit of being automatically being updated, whenever 
the cursor is moved in insert mode.

regards,
Christian
-- 
:wq!

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to