O plugin Gundo requer python 2.4 quando a versão 2.7 está instalada


10

Eu tenho o Python 2.7.9 instalado. E agora recebo a mensagem de que o plug-in Gundo requer 2.4. Existe uma solução alternativa?

Aqui está o meu arquivo vimrc:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required

Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-surround'
Plugin 'easymotion/vim-easymotion'
Plugin 'scrooloose/nerdtree'
Plugin 'jlanzarotta/bufexplorer'
Plugin 'rstacruz/sparkup'
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'jeffkreeftmeijer/vim-numbertoggle'
Plugin 'scrooloose/syntastic'
Plugin 'qpkorr/vim-renamer'
Plugin 'klen/python-mode'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'shinokada/listtrans.vim'
Plugin 'gavinbeatty/vmath.vim'
Plugin 'sjl/gundo.vim'
Plugin 'tpope/vim-abolish'


" Bindings for Listtrans plugin
nmap  ;l   :call ListTrans_toggle_format()<CR>          
vmap  ;l   :call ListTrans_toggle_format('visual')<CR>

" Bindings for Gundo
nnoremap <F5> :GundoToggle<CR>

"_Bindings for vmath
"nmap          ++  vip++
"vmap          ++  VMATH_YankAndAnalyse()                     


" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

:syntax on
let NERDTreeQuitOnOpen=1

:set hlsearch

vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:56:29)
Included patches: 1-488, 576
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux -lacl -lattr -lgpm -ldl

11
Você quer dizer que o Gundo não funciona com a sua versão do Python? Eu acredito que requer pelo menos Python 2.4, mas deve funcionar com qualquer Python 2.4 ou superior. Parece estar trabalhando 2.7.6na minha máquina.
— Łukasz Górski

Na verdade, ele diz que requer 2.4+, mas ainda não faz sentido.
— user3467407

Como assim? Se não funcionar e exibir esta mensagem como uma explicação de erro, há algo errado com sua configuração (o Gundo não se comunica corretamente com o Python, ou pelo menos não com esta implementação específica que você instalou). Se funcionar, é apenas uma informação que você não pode usar o Gundo com o Python anterior à 2.4 (que é muito antiga). Onde exatamente esse requisito de versão do Python é exibido?
— Łukasz Górski

Qual é a sua versão do Vim? Por favor, mostre a :versionsaída
— Christian Brabandt

5
Você tem -python Você precisa de um Vim com + python ou + python / dyn . Tente instalar o vim-gtk a partir do seu gerenciador de pacotes.
— Christian Brabandt

Respostas:


7

Experimente o plugin undotree :

Alguém me perguntou sobre a diferença com o Gundo, aqui está uma lista de diferenças ou vantagens.

  1. É necessária a implementação pura do vimscript e nenhuma biblioteca de terceiros (como python) , não se preocupe com o desempenho, não é um grande problema para o vim lidar com isso. A única dependência é a ferramenta 'diff' que sempre é fornecida com o vim e mesmo sem o 'diff', você ainda pode usar a maioria dos recursos desse script.
  2. Atualizada em tempo real, desfazer a árvore. Depois de fazer alterações, a árvore de desfazer será atualizada simultaneamente.
  3. Várias marcas úteis, como o conjunto de alterações atual, o próximo refazer o conjunto de alterações, o conjunto de alterações salvo etc.
  4. Alterne entre o registro de data e hora relativo e o registro de data e hora absoluto.
  5. Janela de desfazer atualizada em tempo real.
  6. Capacidade de limpar desfazer histórico.
  7. Mais personalizável.

Eu mudei do Gundo para o undotree há alguns anos e funciona muito bem.


Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.