jsctags
jsctags copied to clipboard
no tag found using with tagbar
I want to use jsctags and tagbar in vim,but there were something wrong.
When I used them in vim,the tagbar always said 'no tag found'.
I used the command find . -type f -iregex ".*\.js$" -exec jsctags {} -f \; | sed '/^$/d' | sort > tags
for a test file test.js
, and it created a file named 'tags' in the directory.The file tags
showes the result of the command successfully.
The content of file:
a D:\babun\.babun\cygwin\home\Garcin\test\test.js /a/;" f lineno:1 type:void function()
b D:\babun\.babun\cygwin\home\Garcin\test\test.js /b/;" v lineno:19 namespace:y type:boolean
b D:\babun\.babun\cygwin\home\Garcin\test\test.js /b/;" v lineno:29 type:number
e1 D:\babun\.babun\cygwin\home\Garcin\test\test.js /e1/;" v lineno:33 type:string
e3 D:\babun\.babun\cygwin\home\Garcin\test\test.js /e3/;" v lineno:33 type:number
Foo D:\babun\.babun\cygwin\home\Garcin\test\test.js /Foo/;" f lineno:4 type:void function(?, ?)
func D:\babun\.babun\cygwin\home\Garcin\test\test.js /func/;" f lineno:18 namespace:y type:number function()
it D:\babun\.babun\cygwin\home\Garcin\test\test.js /it/;" f lineno:23 type:!0 function(?)
method D:\babun\.babun\cygwin\home\Garcin\test\test.js /method/;" f lineno:10 namespace:Foo.prototype type:void function()
n D:\babun\.babun\cygwin\home\Garcin\test\test.js /n/;" v lineno:23 namespace:it
prototype D:\babun\.babun\cygwin\home\Garcin\test\test.js /class Foo \{/;" v lineno:4 namespace:Foo
x D:\babun\.babun\cygwin\home\Garcin\test\test.js /x/;" v lineno:12 namespace:Foo.prototype type:string
But when I toggle the tagbar, it does not work.And I found a issue in the repo majutsushi/tagbar
.
Are there any configs that I should write in my vimrc file to let it work correctly for js?