Saturday, July 2, 2011

How can I disable search highlighting after I use search for delete {motion}?

Hi there,

This is a bit complicated, let me try to explain myself a bit.

First of all, search highlighting is a very useful feature and I
always turn it on.

Then, in some situations, I need complicated movement to delete some
text other than simple motions such as 'w' or '%', etc., for example,
for the following text:

new_variable = old_badname_variable + some_other_variable + 7

and my cursor is at the underscore just before 'badname', and I want
to delete some text to make the line read

new_variable = old_variable + 7

I can use the following key strokes 'd/_variable + 7<CR>', will does
the job precisely, However, one problem is that after the deletion,
'_variable + 7' will be highlighted if it occurs in other places in
the same file, which is undesirable.

Does anybody have solution to this annoying problem?

--
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

No comments:

Post a Comment