On 22/05/10 03:06, Gary Johnson wrote:
On 2010-05-22, John Beckett wrote:
Bob wrote:
Ive created some tags files for our codebase here at work.
After creating the tags file I use 'sort'
and rewrite the file so its sorted, however when tags cannot
find a tag, it gives me the following message for each of the
tags files Ive created:
E432: Tags file not sorted: /tmp/web.tags
E432: Tags file not sorted: /tmp/server.tags
E426: tag not found: notarealtag
You are not supposed to 'sort' a tags file as a separate step.
Instead, you tell ctags to sort it. I haven't thought about this
for a long time, and I'm not really sure if I've configured
something clever, but just running 'ctags' on my system results
in the second line of the tags file looking like this:
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
Hmm. If you create the tags file using your own tool (not
ctags), perhaps you need to add that line.
Another thing to think about is how 'sort' sorts your data. I've
had to set
LC_COLLATE=C
in the environment of some of the systems I work on to have 'sort'
and 'ls' use the ASCII collating sequence which I prefer.
Regards,
Gary
According to the help, Vim cannot use "national" collating sequences
that differ from ASCII. It can use case-folded ASCII sorting provided
that 'ignorecase' is on. It can use linear search if you :set
notagbsearch or if there is a !_TAG_FILE_SORTED header with a value of
zero. The value (0, 1 or 2) MUST be separated from the rest by exactly
one hard tab on either side. If no match is found by binary searching,
Vim will try again with a linear search, so if you expect many misses
you should avoid binary searching.
Best regards,
Tony.
--
Krogt, n. (chemical symbol: Kr):
The metallic silver coating found on fast-food game cards.
-- Rich Hall, "Sniglets"
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php