Gary Johnson <[email protected]> [09-08-14 01:40]:
> 
> 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

Hi Gary.

 thanks a lot for your help. I have modified it little to take the
 keyword(s) into account. Now it looks like:
    
     let b:match_words = ' A-\([a-z-]*\) : B-\1 \>'

 and it works like a charm! :)
 
 Have a nice weekend!
 Best regards
 mcc


-- 
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.


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

Reply via email to