On 2009-08-13, [email protected] wrote:
> Hi,
> 
> A tool generates a file as output, which has keywords inside of the
> pattern:
> 
>     A-<keywords> <floating point value n>
>     (some other keywords)
>     B-<keywords> <floating point value n>
> 
> It is always a pair and there a lot of pairs with different <keyword>s
> 
> With "*" or "#" I can search for the _same_ matching keyword up and
> down. Now I want to use another lowercase key to jump between both
> parts of a pair. That is: When the cursor is on
> 
>     A-<keywords> <floating point value n>
> 
> I want to jump to 
> 
>     B-<keywords> <floating point value n>
> 
> and vice versa wihouth modyfing anything, since I need to quick
> compare the floating point values.
> 
> I _know_ that there is no "this does not work with vim" but
> for sure I know that I dont know how.
> 
> Thank you very much for any part of the puzzle in advance!

Just load the matchit.vim plugin, if you don't have it loaded
already (see ":help matchit"), and execute this:

    let b:match_words = '^A\>:^B\>'

You could put that line in the filetype plugin for your tool's
output file.  Then % will jump between A and B just as it does for
parentheses and other pairs of symbols.  Note that I've anchored A
and B to column 1.

Regards,
Gary



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

Reply via email to