One can open a file at tag with:vim -t <TAG>However, if there are two tags with the same name, e.g. two variables of the same name in two different files, then the first one is opened.How to order vim to open second one?
How to select the tag to open when several tags have the same name?
tags;ctags
You can use :tnext to jump to the next matching tag.If you have four tags foo, these commands will let you jump to each tag sequentially:$ vim -t foo:tn:tn:tnYou can use :tp[revious] to jump to the previous tag, :tl[ast] to jump to the last one, :tf[irst] to jump to the first one.And you can use :ts[elect] to list all matching tags.You can also use :ts directly from your shell:$ vim -c ':ts foo'Or :[count]tag if you already know which one you want. Assuming you want the fourth tag:$ vim -c ':4tag foo'See :help tag.