Hi all:

I've checked the post and I believe this issue was not covered
recently:

The search commands executed indirectly through a key mapping or
through a function call won't update the last_pattern_register "/ ,
only the history table is updated.

When I use :lv to build a location list for a symbol in all files of
the current directory I use these functions to further distinguish
them (suppose the symbol word is right under the cursor inside the
location list window):

        function!       FindType()
                normal  /\<^R^W\>\ze\(\s\{-}[&\*:(]\)\...@!
^M
        endfunction

        function!       FindFunction()
                normal  /\<^R^W\>\ze\s\{-}(
^M
        endfunction

        function!       FindIndirect()
                normal  /\<^R^W\>\ze\(\s\{-}&\|\s\{-}\*\)\...@=
^M
        endfunction

and then map them to a few key strokes:

        no      \t      :call FindType()
^M
        no      \f      :call FindFunction()^M

        no      \i      :call FindIndirect()
^M

Here's the problem: the result is neither highlighted, nor can I use
"n" and "N" to find the next match because these two commands also
rely on the Last_pattern_register "/ . Interestingly, the history
table is updated, but it seems that the only way to access it is to
type /<Up>
^M manually.

I mean, it's only a few key strokes I want to save, there must be a
way.

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

Reply via email to