John Beckett <johnb.beckett@gmail.com> [14-04-01 17:28]:
> meino wrote:
> > I often use a search'n'replace on an area, which is limited by
> > a previously selected visual block.
> > Additional hlsearch is on by default.
> > After the searech'n'replace has ended, the found places are
> > marked all over the whole text.
> > This is often irritating to me.
> > Is there a way to limit the highlights set by hlsearch to
> > those place of the visual block area?
>
> As the other reply said, map a key to turn highlights off. See:
> http://vim.wikia.com/wiki/Highlight_all_search_pattern_matches
>
> However, while not really helpful for what you asked, it is
> possible to limit highlights to the last visually selected
> block. See:
> http://vim.wikia.com/wiki/Search_and_replace_in_a_visual_selection
>
> For example, consider these two searches:
> /[abc]
> /\%V[abc]
>
> The first finds all a or b or c, everywhere.
>
> The second finds the same, but only in the last visual
> selection (what would be highlighted if gv were used).
>
> John
>
>
>
Hi John,
thanks for your reply!
I want to 'search and replace' not only to search.
I always thought that '<,'> already say: Do that only inside
the visual block.
Why do I need to specify \%V additionally.
Or do I get all this totally wrong ??????
By the way: I treid to find the expression \%V inside the vim
help...but didnt foudn a match. What is the correct
keyword to find the according help?
Best regards,
mcc
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment