Estou tendo problemas com meu vim com suporte "python".
Eu tinha instalado o gnome-vim, no Ubuntu 11.04, que teoricamente tem suporte "python", mas se eu instalarpatógenoegundo, quando pressiono F5, aparece a mensagem abaixo:
Error detected while processing /home/perseus/Coding/LinuxConfigFiles/.vim/bundle/gundo/autoload/gundo.vim:
line 22:
E837: This Vim cannot execute :py3 after using :python
line 30:
E121: Undefined variable: s:has_supported_python
E15: Invalid expression: !s:has_supported_python
Error detected while processing function gundo#GundoToggle..<SNR>26_GundoToggle..<SNR>26_GundoOpen:
line 2:
E121: Undefined variable: s:has_supported_python
E15: Invalid expression: s:has_supported_python == 2
line 10:
E121: Undefined variable: s:has_supported_python
"__Gundo_Preview__" [New File]
Error detected while processing function gundo#GundoToggle..<SNR>26_GundoToggle..<SNR>26_GundoOpen..<SNR>26_GundoRenderGraph:
line 1:
E121: Undefined variable: s:has_supported_python
E15: Invalid expression: s:has_supported_python == 2
Error detected while processing function gundo#GundoToggle..<SNR>26_GundoToggle..<SNR>26_GundoOpen..<SNR>26_GundoRenderPreview:
line 1:
E121: Undefined variable: s:has_supported_python
E15: Invalid expression: s:has_supported_python == 2
Alguém sabe como consertar isso?
Responder1
Para fazê-lo funcionar atualmente (com suporte para python3), você precisa adicionar a seguinte variável ao seu .vimrc
:
let g:gundo_prefer_python3 = 1
Caso contrário você encontrará erros como: "E117: Função desconhecida: gundo#GundoShow"
Responder2
Estou supondo um ambiente semelhante ao debian
Pegarfonte vim. Baixei a fonte usando mercurial. Se você não o tiver instalado:
apt-get instalar mercurial
Então, obtenha a fonte usando mercurial
hg clone https://vim.googlecode.com/hg/ ~/vimpy2.7
Tinha o python 2.7 instalado e a biblioteca python
apt-get instalar python python-dev
Compile usando o seguinte comando
cd ~/vimpy2.7
./configure --with-features=huge --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/configInstalar
fazer
fazer instalar
Observação: É necessário ser root para rodarmake install
Se tudo funcionar, o vim deve ser instalado em /usr/local/vim. digite ./usr/local/vim, digite dentro do vim :version
e verifique+python
Responder3
Eu tenho os mesmos erros que você.
Aparentemente, ummudança recentepara Gundo ativar o suporte ao Python 3 o quebrou.
Strahinja Markovićbifurcou o repositório de Steve Losh epull solicitou a correção. Pelo menos até que Steve corrija o bug, sugiro que você useRepositório de Strahinjaem vez disso, funciona bem para mim.