我有兴趣改进我的工作流程,并希望添加 clewn 或 pyclewn 以便我可以在 vim 中进行调试。我正在使用 Mac OS X 10.8。不幸的是,我似乎无法按照基本说明安装它。我在此页面上运行指令: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
我尝试通过设置 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
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...
有任何想法吗?不幸的是,我对这类东西知之甚少,无法帮助解决它。该项目托管在 sourceforge 上,我不知道如何在那里报告错误,所以我在这里发布。