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

gutentags_ctags_executable not working #206

SephVelut opened this issue Sep 18, 2018 · 2 comments

gutentags_ctags_executable not working #206

SephVelut opened this issue Sep 18, 2018 · 2 comments


Copy link

SephVelut commented Sep 18, 2018

How do I get it to work? Is it a problem with Vim's jobstart api?

let g:gutentags_project_info = []
call add(g:gutentags_project_info, {'type': 'rust', 'file': 'Cargo.toml'})
let g:gutentags_ctags_executable_rust = 'source /home/.vim/shims/ && ctags'


ctags() {
    rusty-tags vi && mv tags.temp

Never mind the error message below because it never even executes that function. Is it a bash problem with the context the cmd is being executed in?

gutentags: gutentags: ctags job failed, returned: 1
gutentags: ['mv: rename ./tags.temp to ./tags: No such file or directory', '']

Copy link

Can you run :call gutentags#toggletrace() so we can see what Gutentags is doing behind the scenes? When you open a file in a Rust project, it should tell you if it detected the project type correctly. Then it will tell you the command line it's using.

I'm wondering if a ctags executable path that contains && is maybe tripping the script that wants to run it (see this line).

Once you have the debug output and the log file, you can try the generated command line yourself to check what's maybe wrong with it?

Copy link

SephVelut commented Sep 19, 2018

Ah didn't know the cmd was being executed in a shell script. The issue then is that source drops the ctags function into the current shell. But it is unavailable to any child shells. Like the one running in gutentags shell script. I would have to do an export -f ctags in the script where I define a custom ctags function.

There are few other considerations and I would have to look at them when I have time, like possibly needing to use bash -c for my own script. Anyway, this is what I'll just do right now and it works.

/home/.vim/shims/ with no function just a cmd.


rusty-tags vi && mv tags.temp


let g:gutentags_ctags_executable_rust = '/home/.vim/shims/'

This is not a Gutentags issue, closing.

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

No branches or pull requests

2 participants