On Jun 11, 11:44 am, Matt Wozniski <[email protected]> wrote:
> It sounds like you're making a tags file that uses line numbers to
> locate symbols instead of using searches;

Indeed, I do. The tag file format was like:
{tagName}\t{fileName}\t{lineNumber}

That is the way how it was generated for Haskell by ghci. So, it looks
like what I need to do is update ghci code which generates tags so
that it uses better Ex commands. Does not look easy. Also there is a
question of what would be a good search expression so that I find the
symbol definition location and not a location where it is used. Looks
to me that the best chance to have something usable is having
something like "find location matching a search expession which is
nearest to the given line number". Any idea how to do this using Ex
commands?

I'm afraid the source code is not directly available in ghci when tags
are generated, the best I can hope for are line nubmers and column
numbers ... and the type infromation of the symbol from which the
search expression can possibly be improved a bit too.
It looks like a better way is some post-process of the tags file which
matches line numbers to the original source files again and replaces
the line number with a search expression which searches for the whole
line and selects the matching location nearest to the original
location.


> Note that the tags file contains 8 tabs and no spaces.  Vim (afaik)
> does no internal caching of the tags file and reads it from disk every
> time a tag is requested, so the problem you're seeing isn't caused by
> some internal cache going out of date, it's caused by the tags file
> going out of date.

I see, my proposal looks ackward since the {tagadress} field is
actually an Ex command. Still I'm not sure that having ex command
there is better than having line nubmer there and get the tag
locations updated as file is edited. This may result in wrong
locations, but having there some search expressions is not much better
since there is no usable way to fit language syntax and scoping rules
to the search expressions.

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

Reply via email to