>-----Original Message-----
>From: [email protected] [mailto:[email protected]] On Behalf Of
>Andy Wokula
>Sent: Tuesday, May 26, 2009 8:41 AM
>To: [email protected]
>Subject: Re: Highlight Everything But a Specific Pattern
>
>
>Waters, Bill schrieb:
>> I see discussions related to this, but not exactly what I am looking
>> for.
>>
>> I have a file that is made up of mostly a specific pattern. I want to
>> highlight all of the text that is NOT that specific pattern.
>>
>> I see how to highlight the lines that don't contain the pattern...
>>
>> /^\(\(pattern\)\...@!.\)*$
>>
>> ...but I want to do it at the character level.
>>
>> Thanks, Bill
>
>Your "inverse pattern" needs to prevent a match at any single position
>occupied by a match of the original pattern.
>
>I tried with some examples:
>
>A literal pattern:
> /setf
>->
> /\%(setf\|s\@<=etf\|\%(se\)\@<=tf\|\%(set\)\@<=f\)\...@!.
>
>Pattern with .* that for example matches "highlightin":
> /hi.*in
>->
> /\%(hi.*in\|h\@<=i.*in\|\%(hi.*\)\@<=.*in\|\%(hi.*i\)\@<=n\)\...@!.
>
>Pattern with or-branch:
> /any\|match
>->
>
> /\%(any\|match\|a\@<=ny\|m\@<=atch\|\%(an\)\@<=y\|\%(ma\)\@<=tch\|\%(mat\)\@<=ch\|\%(matc\)\@<=h\)\...@!.
>
> /\v%(any|match|a@<=ny|m@<=atch|%(an)@<=y|%(ma)@<=tch|%(mat)@<=ch|%(matc)@<=h)@!.
>
>etc.
>... very impractical. I'm not even sure if you can do it in general.
>
>
>Just for highlighting, I'd do
>
> :match Ignore /{pattern}/
>
>--
>Andy
>
>
Got it. Thanks.
Doing it visually is ok. And this gets me close...
/.
:match Ignore /{pattern}/
Search highlighting for me is black text on a red background. My normal
background is black. The result of the ":match Ignore /{pattern}/" is that the
"pattern" text is black on a black background - invisible. Obviously, I could
change my colorscheme. But do you see a quick/clever/temporary way around this?
--Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---