-
Notifications
You must be signed in to change notification settings - Fork 4
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
E492: Not an editor command: ScalaDoc #1
Comments
At first glance it appears to be installation related. Are you using pathogen or vundle? What directory did you install it to? |
pathogen and .vim/bundle
|
What is the minimum Python version? I am using 2.7.3 |
2.7.3 is fine. I'm using 2.7.2. I can't see it being a ubunutu issue (I've tested on Mac), but I'll run a quick test later today when I get a chance to make sure. |
I tried with Ubuntu 12.04 / Vim 7.3 / Python 2.7.3 and it is working fine for me. Can you run this command and paste the output: :set runtimepath? |
runtimepath= |
It's in your runtime path, so that's not the issue. Maybe try re-install? cd ~/.vim/bundle There should be a ~/.vim/bundle/vim-scaladoc/plugin/scaladoc.vim file that contains the ScalaDoc mapping. You can also try running the following command directly to see if the rest of the installation is working: :call scaladoc#Search("list") |
It works after I manually execute
|
That's odd, can you restart and run the following: :echo exists(":ScalaDoc") |
:echo exists(":ScalaDoc") Adding the following to my .vimrc works as well:
|
Did you reinstall? Unless you added the 'command -buffer...' to your .vimrc, after restart :ScalaDoc should have gone back to not working. So you are seeing :echo exists(":ScalaDoc") returning 2, and :ScalaDoc still not working. That's very strange. I can take out the exists check for :ScalaDoc in my code, although I'm puzzled why it would behave this way. Alternatively you can add the 'command -buffer...' to your .vimrc for a quickfix. |
What's in your vimrc related to this plugin? I have been trying to resolve this issue on my own for about an hour, and nothing I am trying is working. I am following other plugins such as vim-fireplace (clojure plugin) as a model, as well as attempting some of the patterns described in this blog post by @sjl |
I took the following steps:
set nocompatible
call pathogen#infect() Result of Error detected while processing function scaladoc#Search:
line 23:
Traceback (most recent call last):
File "<string>", line 11, in <module>
File "/home/noahlz/.vim/bundle/vim-scaladoc/pylibs/scaladoc.py", line 71, in Search
api_path = _FindLocalDocs(file_name)
File "/home/noahlz/.vim/bundle/vim-scaladoc/pylibs/scaladoc.py", line 162, in _FindLocalDocs
(path, tail) = os.path.split(path)
File "/usr/lib/python2.7/posixpath.py", line 83, in split
i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Press ENTER or type command to continue |
Your original problem doesn't seem to be there anymore. If you can run :ScalaDoc then the mapping is working. The problem you have now is that you are running from an unnamed file and vim-scaladoc uses your local file to try to find a path to local docs. I've uploaded a patch for this so that it will work on unnamed files as well. Regarding what is in my .vimrc related to this plugin. I've tried it with and without any settings and it works for me. Let me know if you still see issues, although I'm still puzzled by why you were first seeing the :ScalaDoc not found issue. It's as if there was an incomplete download. |
It works when I set up my .vimrc as in this commit Understood that the error is due to running |
Ok, I have solid reproduction steps for this issue:
set nocompatible
call pathogen#infect()
|
If you are referring to the AttributeError, then yes that is the bug fixed by my last push. If you are saying that :ScalaDoc is returning E492 then there is something not right with the installation or at least I can't reproduce it. |
I am getting this error when attempting
:ScalaDoc
in a scala file.:help scaladoc
works and displays the help text.Python support is enabled (compile flag
+python
) and many other plugins work.Ubuntu 12.04 LTS / Vim 7.3
The text was updated successfully, but these errors were encountered: