About python3 support

Issue #42 new
created an issue

Hi,love this plugin,but facing a problem with python3.Just like Issue #35

Python3 is ok with vim, I type :python3 print('1') ,and it will show 1.

But when I toggle gundo , I got "Gundo requires Vim to be compiled with Python 2.4+". After I install python 2.7.5, everything is ok.

So I wonder if there is something wrong with python3 support? Thank you.

Comments (3)

  1. dpomondo

    homebrew warned me that python2 and python3 could make MacVim unstable, so I compiled a version with only python 3 -- which broke gundo. Adding this line to my .vimrc file fixed the problem for me:

    let g:gundo_prefer_python3 = 1
  2. Daniel Watkins

    Thanks, @dpomondo, that also fixed my issue.

    However, I thought it worth noting that Python 2 is being dropped from install media in Ubuntu 16.04 LTS, which means that Ubuntu's vim will be compiled with +python3 and not +python, so all gundo users on Ubuntu that upgrade are going to have to find out about this option.

  3. Carl Poulin

    Daniel Watkins is right; on stock Ubuntu 16.04, gundo.vim is broken out of the box.

    I added the following to my .vimrc, but maybe it would make sense to put it in the plugin code.

    if has('python3')
        let g:gundo_prefer_python3 = 1          " anything else breaks on Ubuntu 16.04+
  4. Log in to comment