Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3784424
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:22:30+00:00 2026-05-19T11:22:30+00:00

I know that Vim has sophisticated support for tags but I am struggling to

  • 0

I know that Vim has sophisticated support for tags but I am struggling to get them to work with JavaScript and TCL.

I am using Vim 7.2.330 under Ubuntu Lucid, a standard Vim install and standard Exuberant CTags install.

I wish to keep my tags in a file called ~/.vimtags/tags

I have included the tags file in my vimrc file set tags+=$HOME."/vimtags/tags".

I have run 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 online that said you should add these 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 up Vim, the tags file definitely gets loaded. A set tags? shows that the tag file has been included.

However, whenever I CTRL-] over a keyword, it always says that there are no tags.

Please could you share how you set up Vim tags with JavaScript, and also show how you use the tag system? It seems to be a great feature of Vim, if only I could get it working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:22:31+00:00Added an answer on May 19, 2026 at 11:22 am

    However, whenever I CTRL-] over a keyword, it always says that there are no tags.

    tags are not supposed to work on keywords, they work on symbols you have defined (functions, variables, constants, etc) in the indexed files. So if you are trying on a Javascript keyword it won’t work. It won’t work on a function from a library either, if you have not included the JS library to your tag file (using ctags -a for example).

    If you want to be sure what has been indexed and what you have access to with <C-]>, you can simply open your “tag” file, and see what’s in there.

    :e ~/.vimtags/tags

    You should see a header with information relative to the tag file format, followed by a tag list, which include the tag name followed by a file path, a line number, and a character identifying the type of tag.

    If it has some content, it should work for the listed symbols.

    Regarding your ctag setup, it looks fine in my opinion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that Phonegap has an event for back button, but it's only available
I know that this sort of question has been asked here before, but still
I accidentally press a shorcut key, and I know that vim has done something
I know that Java have its own garbage collection, but sometimes I want to
I know that in order to download a cookie associated with an account using
I know that many threads has been created here & on the internet about
I have a plugin that will only run if vim has been compiled with
How do text editors perform syntax highlighting? I know that vim uses simple regular
I found substitue in vim has a range parameter: :[range]s/pattern/sring/[c]/[g]/[e]/[i]/[I]/[p] But I'm wondering if
Ive been trying to get the VIM auto completion working, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.