I know that Vim has complex tag support, but I'm struggling to get them to work with JavaScript and TCL.
I use Vim 7.2.330 under Ubuntu Lucid, a standard Vim installation, and standard Exuberant CTags.
I want to save my tags in a file named ~/.vimtags/tags
I have included the tag file in my vimrc file set tags+=$HOME."/vimtags/tags" .
I ran the following command from the base code directory:
ctags-exuberant -f ~/.vimtags/tags -h ".js" --totals=yes --tag-relative=yes --fields=+akst -R
I also have the following in my .ctags file - I saw an article somewhere on the web that said you should add them to make it compatible with modern JavaScript.
--langdef=js --langmap=js:.js --regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/,object/ --regex-js=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/,function/ --regex-js=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*\(([^)])\)/\1/,function/ --regex-js=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\[/\1/,array/ --regex-js=/([^= ]+)[ \t]*=[ \t]*[^"]'[^']*/\1/,string/ --regex-js=/([^= ]+)[ \t]*=[ \t]*[^']"[^"]*/\1/,string/
When I load Vim, the tag file definitely loads. A set tags? indicates that the tag file has been included.
However, when I CTRL-] over a keyword, it always says that there are no tags.
Could you share how to configure Vim tags using JavaScript, and also show how you use the tag system? This seems to be a great Vim feature if I could make it work.
mrwooster
source share