-
-
Notifications
You must be signed in to change notification settings - Fork 485
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't specify ctags location with space in path name #41
Comments
Both things work fine for me, I explicitly tested those conditions. What version are you using? What exactly happens, do you get an error message? What Vim version do you have? |
Ok, here is more info: $ vim --version $ ctags --version I tried all of the following in _vimrc "let g:tagbar_ctags_bin='C:\Program Files\Tools\ctags\ctags.exe' Each leads to the same error from vim: "Tagbar: Exuberant ctags not found in specified place, skipping plugin" By the way, taglist plugin works with the following setting: let Tlist_Ctags_Cmd="C:/PROGRA~1/Tools/ctags/ctags.exe" and probably others. I have not played too much with this setting there. |
Oh, and this is on Windows 7 64bit Enterprise, SP1. I'm also using MKS Toolkit , which is a port of POSIX UNIX APIs, shells and standard UNIX utilities (something like Cygwin, except nicer :D). |
Sorry for the late reply, I've been very busy recently. Anyway, there must be something strange going on with your system, all the setting that you tried worked perfectly fine for me (on Windows Server 2003). The only thing that I tried that didn't work was using backslashes together with double quotes (and it's not surprising that that didn't work). What's the value of your Near the top of the file
Does the plugin work if you comment out the |
I'm using MKS Toolkit Korn Shell as my default shell, so shell=ksh in my _vimrc. In any case the problem seems to be with the if statement at the top of the tagbar.vim file if I remove the quotes around the g:tagbar_ctags_bin variable when passing it to exists function, so the line becomes
then everything works. |
But by removing the quotes around the variable the test will do something entirely different: it will check whether there's a variable with the name of the path you configured (i.e. a variable named Just in order to check what the actual problem is, could you please still test whether it works if you disable |
This sounds like there's a |
Interesting, I didn't know |
Ignore my previous comment. Yes, removing quotes around the variables allows vim to start without errors but the plugin doesn't actually work. So, expand call it seems is the real culprit here. First of all the reason I'm defining g:tagbar_ctags_bin variable in the first place is because I got multiple ctags executables in my path:
However, the wrong ctags (one that comes with MKS Toolkit) is first in path, so I have aliased ctags to exuberant ctags. However, if you execute ctags from gVim, it sees the one first in path as expected. It looks like expand(g:tagbar_ctags_bin) returns empty string. So just commenting out the line
actually solves the problem. After that vim starts without errors and plugin actually works. |
OK, that's good to know that |
Yes, I have *.exe in my wildignore
However, even if I comment out this line in my _vimrc, so wildignore has its default value I still get the following error:
My shellslash is set to default value (I believe it is \ on Windows). |
Now I'm a bit confused, didn't you just say it worked for you? Do you mean it works when commenting out the
is? |
It works only when I uncomment expand line. It does not work if I uncomment only wildignore and still use expand line. Here is the output of the ctags --version (ctags is the alias to exuberant ctags in program files).
So, to recap, if I uncomment expand line, everything works (wildignore has no effect). If expand line is present, the plugin does not even start with wildignore line as above. If expand line is present and wildignore is commented out, then vim stars with no errors but I get the error in my previous post only when I actually try to :TagbagOpen |
That is really weird, the ctags version looks perfectly fine. I wonder if it has anything to do with the file it's trying to open in your error message above -- it shouldn't really open any files. Is that a file you were trying to edit? If not, could you check what kind of file it is or what's in it? Also, could you tell me what the output of both of the following commands is (with wildignore commented out)?
Sorry for asking so many questions, but I'd really like to get to the bottom of this to fix it properly :). Thanks for helping out! |
Here is the output of the above two commands:
By the way the temp file it's complaining about in the error message does not exist. I think this is just VIM executing ctags to get its output in a temp file. But it does not succeed, so temp file does not get created and VIM complains. |
So the value with and without I'll commit a small change that will reset the |
Hi, are you still having this problem? If not I would prefer to close this issue so it doesn't clutter up the list. Thanks! |
There appear to be several problems with g:tagbar_ctags_bin option. First, if the path to ctags executable contains a space, it is never recognized. Also, it appears shellslash option is not respected either.
The text was updated successfully, but these errors were encountered: