If the original post was a request for an option to customize the ex_cmd for file entries, the first bug listed at http://ctags.sourceforge.net/ctags.html#BUGS is relevant: "Ctags has more options than ls(1)."  Adding another seems a step in the wrong direction.

For those wants to customize the ex_cmd to a specific vim command "singlequote doublequote" instead of the positioning command "1", confirm that vim is the only consumer of your tag file (not the case in all shops, like mine), then try either of these barely-tested commands:

perl -p -i -e 's@^(([^\t]+\t){2})1;@$1\x27";@' tags

or

perl -F'\t' -i -ape '$F[2]=s@1;@\x27";@' tags

 

 

 

On Tue, 25 Oct 2011 16:06:23 -0700, Kaz Kylheku wrote:

On Tue, 25 Oct 2011 22:45:11 +0000, Gary Holloway
<Gary.Holloway@castandcrew.com> wrote:
"parser.c" is a tag to the source file itself, hence the tag's "location" is line 1, so it's going to line 1, which is exactly where it should go.
Yes; this is the behavior I would like to customize. I'm accustomed
to the cursor being where I last edited when I open a file.

Line 1 is exactly where the cursor should go if your user name
is a member of the set that includes "Gary Holloway"; it
would be a shame if that behavior went away.

Others might prefer the behavior of "vi -t parser.c" to be
more or less exactly that of "vi path/to/parser.c".
The quote in the tag file introduces a comment.
I see. The man page gives this general format:

tag_namefile_nameex_cmd;"extension_fields

Somehow, using the command '" for ex_cmd works. The
end result is that the cursor jumps to the correct line.
Perhaps this is by some kind of fluke.
If you 'vi -t' to a tag that is a function in the file, it will go to that line in the file when opened.
Well yes; that would be the "hello, world!" use case for tags, right?

But from this it does not follow that if I'm referencing an
object which is a file, I must also want the first line of
the file.

For one thing, the first line of the file kicks off a
50 line copyright and licensing notice, identical to one that
appears in dozens of other files.




------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Ctags-users mailing list
Ctags-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ctags-users