> hi,
>
> i want to map forward/backward search / and ? to a function.
> basically i want to set a variable whenever i search and rest
> of the / and ? functionality should be same. how can i do that.
> is there any better way to do it rather than mapping /, like
> constructor
> function being called every time i search.
>
> thanks
>
What's wrong with mapping / and ? (apart from the fact that intercepting
searches is, shall we say, rather unusual)?
Of course, at the time you hit your remapped / or ? the search pattern
is not yet known.
Do you want to change anything about the handling of
:s[ubstitute]
:&
:g[lobal]
:v[global]
n
N
search()
the operators =~ !~ =~# !~# =~? !~?
? (some of these would be problematic with existing plugins)
Or else, you could select a totally different {lhs} such as <F8> and
<S-F8> and map them to invoke your function then search?
Best regards,
Tony.
--
Ray's Rule of Precision:
Measure with a micrometer. Mark with chalk. Cut with an axe.
--
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