jsctags icon indicating copy to clipboard operation
jsctags copied to clipboard

unable to get proper tags file for vim

Open imiten opened this issue 10 years ago • 7 comments

Hi,

I tried on bunch of files as well as single file and generate tags file but seems vim will not find the tag.

https://github.com/Countly/countly-server/blob/master/api/api.js

jsctags api.js -f >> tags

Then in vim tried to CTRL + ] with cursor under "validateUserForWriteAPI" on line 248. It says tag not found. E426: tag not found: validateUserForWriteAPI

I hope I am attempting the use of this module correctly.

Also to create a tags file for entire dir tree should I do:

find . -name "*.js" | xargs -n 1 -I {} jsctags {} -f >> tags

I tried above and it said tags file not sorted. cannot find tag.

Regards

Miten.

imiten avatar Aug 15 '14 17:08 imiten

find . -name "*.js" | xargs -n 1 -I {} jsctags {} -f > tags

Seems to work for generating the tags, but still generate them with empty spaces in between rows and unsorted, which causes vim to complain

mitermayer avatar Dec 17 '14 05:12 mitermayer

If you input this command you should get the output correct of the ctgas

find . "*.js" -exec jsctags {} -f \; | sed '/^$/d' | sort > tags

mitermayer avatar Dec 17 '14 05:12 mitermayer

@mitermayer does this still work? If so do you think it would be a good addition to the README?

faceleg avatar Sep 28 '15 23:09 faceleg

find . -type f -iregex .*\.js$ -exec jsctags {} -f \; | sed '/^$/d' | sort > tags might be a better option.

ianks avatar Oct 15 '15 15:10 ianks

@ianks is this worth adding to the README?

faceleg avatar Oct 15 '15 20:10 faceleg

Yes it would IMO. What would be even better was if the CLI had a better interface, though.

ianks avatar Oct 15 '15 22:10 ianks

PR!

faceleg avatar Oct 15 '15 22:10 faceleg