我已经vim-nox
从向后移植的 Debian Wheezy 机器中安装了 7.4 版软件包。我很困惑,Python 功能仍然无法正常工作,如vim --version
命令-python
和-python3
.我一直在四处冲浪并通过清除vim-tiny
和重新安装找到可能的解决方案vim-nox
,但没有成功。
这是输出dpkg -l vim*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================-==================================-============-================================================================================================
ii vim 2:7.4.488-3~bpo70+1 amd64 Vi IMproved - enhanced vi editor
un vim-athena <none> (no description available)
ii vim-common 2:7.4.488-3~bpo70+1 amd64 Vi IMproved - Common files
un vim-doc <none> (no description available)
un vim-gnome <none> (no description available)
un vim-gtk <none> (no description available)
un vim-lua <none> (no description available)
ii vim-nox 2:7.4.488-3~bpo70+1 amd64 Vi IMproved - enhanced vi editor - with scripting languages support
un vim-perl <none> (no description available)
un vim-python <none> (no description available)
un vim-ruby <none> (no description available)
ii vim-runtime 2:7.4.488-3~bpo70+1 all Vi IMproved - Runtime files
un vim-scripts <none> (no description available)
un vim-tcl <none> (no description available)
un vim-tiny <none> (no description available)
答案1
我发现问题的发生是由于默认路径是vim
go to /usr/bin/vim
or /usr/local/bin/vim
,它不提供python
功能,而不是vim-nox
.我通过使用which
命令排查才意识到这个问题。
因此,我干脆给vim起了个别名vim.nox。
alias vim='vim.nox'