From 188a391ac524251206a5c256cb531c940b3ac288 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 4 May 2019 11:15:23 +0200 Subject: vimrc: Have Gundo use Python 3 when Vim is compiled with `+python3` After recently installing my vimrc on a newer machine and trying Gundo, I ended up with this error message: Gundo requires Vim to be compiled with Python 2.4+ Fortunately, it also supports Python 3 via a flag. Thanks to Carl Patenaude Poulin (https://bitbucket.org/cpoulin) for this solution: https://bitbucket.org/sjl/gundo.vim/issues/42/about-python3-support#comment-32289592 --- vimrc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vimrc') diff --git a/vimrc b/vimrc index e20505f..3bc26cf 100644 --- a/vimrc +++ b/vimrc @@ -403,6 +403,7 @@ " 2019.05.04: " * Use `.agignore` in Pick command. This allows us to exclude files and " folders from Pick at a project level. +" * Tell Gundo to use Python 3 if Vim is compiled with `+python3`. " @@ -589,6 +590,9 @@ endif " Gundo nnoremap gu :GundoToggle +if has('python3') + let g:gundo_prefer_python3 = 1 +endif " Netrw -- cgit v1.2.3