如何正确安装vim的pyclewn? [英] How to properly install pyclewn for VIM?
问题描述
https://sourceforge.net/projects/pyclewn/
mbp:pyclewn-1.10.py2 nate $ python setup.py install --force
无法运行gvim作为Vim。
请设置EDITOR环境变量或运行'pyclewn --editor = / path / to /(g)vim'。
追溯(最近的最后一次调用):
文件setup.py,第48行,< module>
vimdir = pyclewn_install.vimdir()
文件/Users/nate/Downloads/pyclewn-1.10.py2/clewn/misc.py,第85行,_dec
ret = f( * args)
文件/Users/nate/Downloads/pyclewn-1.10.py2/pyclewn_install.py,第49行,vimdir
path = vim.exec_vimcmd(['echon $ VIM'])
文件/Users/nate/Downloads/pyclewn-1.10.py2/clewn/vim.py,第96行,在exec_vimcmd
subprocess.Popen(args).wait()
文件/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py,第679行,__init__
errread,errwrite)
文件/ Library / Frameworks / Python .framework / Versions / 2.7 / lib / python2.7 / subprocess.py,第1249行_execute_child
raise child_exception
OSError:[Errno 2]没有这样的文件或目录
我尝试通过设置EDITOR变量来做到这一点:
mbp:pyclewn-1.10.py2 nate $ EDITOR = / usr / bin / vim
mbp:pyclewn-1.10.py2 nate $ echo $ EDITOR
/ usr / bin / vim
...但是我再次收到相同的错误。如果我尝试使用Python 3版本的pyclewn,我也会遇到同样的错误。
尝试运行其他建议的命令会产生另一个错误:
mbp:pyclewn-1.10.py2 nate $ ./pyclewn --editor = / usr / bin / vim
vim CRITICAL
pyclewn中的异常:
< class' ClewnError'>
pyclewn.vim版本与pyclewn不匹配:
pyclewn版本:pyclewn-1.10.py2
pyclewn.vim版本:
源代码行:% pyclewn_version,version))
at /Users/nate/Downloads/pyclewn-1.10.py2/clewn/vim.py:383
pyclewn aborting ...
任何想法?不幸的是,我不清楚这种东西有助于解决这个问题。该项目是在sourceforge上托管的,我不知道如何报告错误,所以我在这里发布。
像往常一样,我是个白痴。没有导出EDITOR变量,python脚本是不可见的。所以,对于那些有这个错误的人,你需要做:
$ EDITOR = / usr / bin / vim
$ echo $ EDITOR
/ usr / bin / vim
$ export EDITOR
对于我来说,似乎我的vim版本的确有 netbeans_intg
和 autocmd
支持(需要为pyclewn)。它没有 python3
支持。您可以通过键入 vim --version
来计算出来。我不知道在过去的某个时刻,我是否替换了OS X附带的vim版本,或者现在是如何实现的。我不知道为什么我会修改/替换 / usr / bin /
版本,所以我认为现在是标准的。希望这适用于别人。
I am interested in improving my workflow, and was hoping to add clewn or pyclewn so I could do debugging in vim. I am using Mac OS X 10.8. Unfortunately, I can't seem to get it installed with the basic instructions. I run the instuctions on this page: http://pyclewn.sourceforge.net/install.html https://sourceforge.net/projects/pyclewn/
mbp:pyclewn-1.10.py2 nate$ python setup.py install --force
Failed to run 'gvim' as Vim.
Please set the EDITOR environment variable or run 'pyclewn --editor=/path/to/(g)vim'.
Traceback (most recent call last):
File "setup.py", line 48, in <module>
vimdir = pyclewn_install.vimdir()
File "/Users/nate/Downloads/pyclewn-1.10.py2/clewn/misc.py", line 85, in _dec
ret = f(*args)
File "/Users/nate/Downloads/pyclewn-1.10.py2/pyclewn_install.py", line 49, in vimdir
path = vim.exec_vimcmd(['echon $VIM'])
File "/Users/nate/Downloads/pyclewn-1.10.py2/clewn/vim.py", line 96, in exec_vimcmd
subprocess.Popen(args).wait()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I try to do as it suggests by setting the EDITOR variable:
mbp:pyclewn-1.10.py2 nate$ EDITOR=/usr/bin/vim
mbp:pyclewn-1.10.py2 nate$ echo $EDITOR
/usr/bin/vim
...But I get the same error again. I get the same error if I try to use the Python 3 version of pyclewn as well.
Trying to run the other suggested command gives another error:
mbp:pyclewn-1.10.py2 nate$ ./pyclewn --editor=/usr/bin/vim
vim CRITICAL
Exception in pyclewn:
<class 'clewn.ClewnError'>
"pyclewn.vim version does not match pyclewn's:
pyclewn version: "pyclewn-1.10.py2"
pyclewn.vim version: """
source line: "% (pyclewn_version, version))"
at /Users/nate/Downloads/pyclewn-1.10.py2/clewn/vim.py:383
pyclewn aborting...
Any ideas? I don't know enough about this kind of stuff to help fix it, unfortunately. The project is hosted on sourceforge, and I can't figure out how to report a bug there, so I'm posting here.
As usual, I am an idiot. Having not exported the EDITOR variable, it was invisible to the python script. So, for those of you that have this error, you need to do:
$ EDITOR=/usr/bin/vim
$ echo $EDITOR
/usr/bin/vim
$ export EDITOR
For me it seems that my version of vim does have netbeans_intg
and autocmd
support (required for pyclewn). It does not have python3
support. You can figure this out by typing vim --version
. I am not sure if at some point in the past I replaced the version of vim that comes with OS X, or if that is how it comes now. I don't know why I would have modified/replaced the /usr/bin/
version, so I assume it is now standard that way. Hopefully this works for others.
这篇关于如何正确安装vim的pyclewn?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!