Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!bcm!dimacs.rutgers.edu!rutgers!bellcore!uunet!mcsun!ukc!tcdcs!dce.ie!em From: em@dce.ie (Eamonn McManus) Newsgroups: comp.editors Subject: Re: Vi: Macro Challange... tags..^].. one better Message-ID: Date: 29 Jan 91 17:13:17 GMT References: <1991Jan26.213324.29463@cpqhou.uucp> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 23 jww@cpqhou.uucp (Jeff Wolford) writes: > But when I type ^] again I want vi to "tag" to the second entry > in the file and then the third ..fourth..etc and finally back > to the first One hacky possibility would be to have several tags files, as many as there can be entries for variables. For instance, if variable `v' has three entries, then the files tags1, tags2, tags3 could look like this: tags1: v filea /patterna/=|set tags=tags2 tags2: v fileb /patternb/=|set tags=tags3 tags3: v filec /patternc/=|set tags=tags1 For other variables with fewer entries you can just duplicate the tags1 entries in the later tags files. There are lots of problems with this way of doing things, such as that a :tag will end you up at an essentially random one of the entries (depending on the current tags file), and vi insists on printing out the matched line and saying [Hit return to continue] if you just say /pattern/; the = causes it to print the matched line number instead and not wait for a key. , Eamonn