Ctags and scoreboard settings are out of sync

I am trying to use a tagbar to read code in jquery-1.7.1.js (renamed jquery.js), but it

does not work and no errors are displayed:

"your ctags and tagbar settings are out of sync!".

And my file is ~ / .ctags:

--regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*new[ \t]+Object\(/\1/o,object/ --regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\{/\1/o,object/ --regex-JavaScript=/([A-Za-z0-9._$()]+)[ \t]*[:=][ \t]*function[ \t]*\(/\1/f,function/ --regex-JavaScript=/function[ \t]+([A-Za-z0-9._$]+)[ \t]*\([^\]\)]*\)/\1/f,function/ --regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*new[ \t]+Array\(/\1/a,array/ --regex-JavaScript=/([A-Za-z0-9._$]+)[ \t]*[:=][ \t]*\[/\1/a,array/ --regex-JavaScript=/([^= ]+)[ \t]*=[ \t]*[^""]'[^'']*/\1/s,string/ --regex-JavaScript=/([^= ]+)[ \t]*=[ \t]*[^'']"[^""]*/\1/s,string/ 
+1
source share
1 answer

You should read the second line of this error message: "Please read": help tagbar-extend ".

When you define a new language using ctags (or modify an existing one), you also need to provide the appropriate Tagbar configuration so that Tagbar knows that a new language exists and how to interpret the output of ctags. In your case, this configuration should work (put it in ~ / .vimrc):

 let g:tagbar_type_javascript = { \ 'ctagstype' : 'JavaScript', \ 'kinds' : [ \ 'o:objects', \ 'f:functions', \ 'a:arrays', \ 's:strings' \ ] \ } 
+4
source

All Articles