Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you add g:tagbar_jsctags_bin #53

Closed
darcyparker opened this issue Dec 6, 2011 · 3 comments
Closed

Can you add g:tagbar_jsctags_bin #53

darcyparker opened this issue Dec 6, 2011 · 3 comments

Comments

@darcyparker
Copy link
Contributor

Hi,

I installed jsctags installed on a win32 machine. (See my gist: https://gist.github.com/1438882)

To get tagbar to work with jsctags on gvim win32, I had to hard code my path to jsctags.cmd in the autoload/tagbar.vim file.

ie: in the latest version on github, I changed these lines as follows.
line 404: if executable('d:\opt\node\jsctags.cmd')
line 417: let type_javascript.ctagsbin = 'd:\opt\node\jsctags.cmd'

Works nicely now on windows. But this of course is just a workaround.

It would be nice to have logic similar to if !exists('g:tagbar_ctags_bin') logic earlier in the file.

Thanks
Darcy

@majutsushi
Copy link
Collaborator

You can set the path to jsctags in the type definition in your vimrc as explained under :h tagbar-extend. At the moment that requires copying the whole javascript type definition from the tagbar source into your vimrc (and then adding the extra field), but I'm trying to think of a way that would make that unnecessary (so you would only have to specify the path).

@majutsushi
Copy link
Collaborator

I have just pushed a change that removes the need to provide the complete jsctags configuration if jsctags is not in your $PATH, so you only have to specify the ctagsbin key. I guess I can close this bug then.

@darcyparker
Copy link
Contributor Author

Thanks! I just pulled the changes and tested. Works nicely. I like the s:CheckFTCtags() function you used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants