Bram wrote: > 8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.
That would be handy, but my script won't need it. > There is also omni completion, which is smarter but more complicated. That's for completion, there's nothing for tags. I think the best idea would be to have a new setting 'tagfunc', which is the name of a user function to call for creating the tag list. It would be called everywhere a tag list is needed, EXCEPT when taglist() is called inside a call to that function. It should take two arguments: - Name of the tag - Boolean (or possibly string of options in case of future expansion) to say whether tag was found under the cursor. In this case the script can look at the surrounding text too. It would return a list in the same format as returned by taglist(). So a user function which just returns the normal tags could be done something like this: func! CustomTags(name, atCursor) let tags = taglist('^' . name . '$') return tags endfunc Oh, is it possible to cause two searches one after the other from a tags file? That is, when jumping to a certain tag vim would first search for one pattern from the start of a line, then search for another? My thinking is that sometimes members of the same name in different classes can have exactly the same declaration line. I'd like to search for the appropriate class header first. Dominique Pelle wrote: > I wish you success, I could certainly use something like this. > Having to work on C++ code with many classes with function > members such as ::Save(), pressing g<ctrl-]> can show a large > list of matching tags and it's not always easy to tell which is > the right one. > > I don't know anything which finds the correct tag for C++. > > I had an idea a while ago to use the output of objdump > command to find where to jump. See this thread: > > http://groups.google.com/group/vim_use/browse_thread/thread/ad32ba82d2a40534/87f6ad20ecce7815 My script so far only relies on tags, and I think I can handle most simple cases that way. In the example from your thread, it already handles method1(). I haven't worried about matching argument lists yet, so method2() will still be wrong. That may be a bit trickier since the required info won't always be in the tags file, but some simple cases may be doable. The script's going quite well, but really needs 'tagfunc' to be fully operational. Rob. -- Robert Webb <[EMAIL PROTECTED]>, MineSweeper3D - Take Minesweeper to a whole new dimension! http://www.software3d.com/Mines3D --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---