安装2.7版时,Gundo插件需要python 2.4


10

我已经安装了Python 2.7.9。现在,我收到消息,Gundo插件需要2.4。有解决方法吗?

这是我的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

1
您是说Gundo不适用于您的Python版本吗?我认为它至少需要Python 2.4,但应该与任何Python 2.4+兼容。似乎可以2.7.6在我的机器上使用。
卢卡斯Górski酒店

它确实说它需要2.4+,但仍然没有意义。
user3467407 '02

为何如此?如果它不起作用并显示此消息作为错误说明,则说明您的设置存在问题(Gundo无法与Python正常通信,或者至少与您安装的此特定实现没有通信)。如果可行,这只是一个信息,您不能将Gundo与2.4或更早的Python一起使用(它本身已经旧了)。该Python版本要求到底在哪里显示?
卢卡斯Górski酒店

您的Vim版本是什么?请出示:version输出
基督教Brabandt

5
您有-python,您需要一个带+ python+ python / dyn的Vim 。尝试从软件包管理器安装vim-gtk。
克里斯蒂安·布拉班德

Answers:


7

试试undotree插件

有人问我与Gundo的区别,这里列出了区别或优点。

  1. 纯粹的vimscript实现,不需要第三方库(例如python),不用担心性能,对于vim来说,处理这并不是什么大问题。唯一的依赖是vim始终附带的'diff'工具,即使没有'diff',您仍然可以使用此脚本的大多数功能。
  2. 实时更新的撤消树。进行更改后,撤消树将同时更新。
  3. 几个有用的标记,例如当前变更集,下一个重做变更集,保存的变更集等。
  4. 在相对时间戳和绝对时间戳之间切换。
  5. 实时更新撤消窗口。
  6. 清除撤消历史记录的能力。
  7. 更可定制。

大约几年前,我已经从Gundo切换到undotree,并且效果很好。


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.