Closed frnsys closed 8 years ago
@ftzeng Hello. Strange. The python installer definitely should be working fine, no changes in ages and build is working. Also, I use it daily without ruby support. You are correct in your assumption, if your vim has -ruby +python +python3
it should use the python3 interface automatically.
Strangely, it does not freeze when I run it from a fresh install.
To clarify, you mean the first time you do the command on a system with nothing in ~/.vim/plugged
it works fine? It is just subsequent calls where plugins already exist?
Please try these commands to test the python interfaces, report if there are errors. Paste me the output of version in a code block.
:python3 print('hello')
:python print 'hello'
:version
Also, please provide me with the smallest subset of your vimrc that reproduces this problem.
To clarify, you mean the first time you do the command on a system with nothing in
~/.vim/plugged
it works fine? It is just subsequent calls where plugins already exist?
Yes, after that it freezes.
:python print 'hello'
gave the following error:
E836: This Vim cannot execute :python after using :py3
E263: Sorry, this command is disabled, the Python library could not be loaded.
The output of :version
:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 6 2015 13:56:00)
Compiled by ftseng@sputnik
Huge version with GTK2 GUI. Features included (+) or not (-):
+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/dyn +viminfo
+cscope +lispindent +python3/dyn +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui +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_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra -mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop
+farsi +mouse_netterm +syntax
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -I/usr/local/include -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lelf -lnsl -ldl -L/usr/lib -llua5.1
@ftzeng Ok, probably related to fact you built with dynamic and the two python versions.
I'd like to try something on a hunch, find the first block below in your ~/.vim/autoload/plug.vim
. Then change it to second block, see if it freezes after that.
function! s:update_python()
let py_exe = has('python3') ? 'python3' : 'python'
execute py_exe "<< EOF"
function! s:update_python()
let py_exe = has('python') ? 'python' : 'python3'
execute py_exe "<< EOF"
Unrelated note, how come your patch level isn't displayed?
@ftzeng Also, I've tried to reproduce but I can't. I built vim with these configure flags: --enable-pythoninterp=dynamic --enable-python3interp=dynamic --with-features=huge
off of latest master. I can't reproduce the problem with my vimrc. Could you supply me with your vimrc so I can try/inspect it.
@starcraftman Changing the line you suggested didn't help unfortunately.
The problem still comes up even if the vimrc
is this simple:
"auto-install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
endif
call plug#begin('~/.vim/bundle')
Plug 'ehamberg/vim-cute-python'
Plug 'tpope/vim-surround'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter'
Plug 'lepture/vim-jinja'
Plug 'airblade/vim-gitgutter'
Plug 'digitaltoad/vim-jade'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'JuliaLang/julia-vim'
Plug 'derekwyatt/vim-scala'
Plug 'bling/vim-airline'
Plug 'pangloss/vim-javascript'
Plug 'Shougo/neocomplete.vim'
Plug 'Shougo/unite.vim'
Plug 'Shougo/vimproc.vim', {'dir': '~/.vim/bundle/vimproc', 'do': 'make -s'}
Plug 'sirver/ultisnips'
Plug 'klen/python-mode'
Plug 'ftzeng/python-syntax'
Plug 'ftzeng/futora'
Plug 'dhruvasagar/vim-table-mode'
Plug 'Lokaltog/vim-easymotion'
call plug#end()
@ftzeng Interesting, something weird going on. I can reproduce with your config. I also notice that for some reason nocompatible
isn't set when I use it. I will investigate further.
Edit: Am making progress, appears to be some weird behaviour regarding threads only when using dynamic python. May have to add dynamic builds to travis.
@ftzeng Good news, I believe I've resolved the issue. Had to do with code I was executing at the end of the threads.
If you don't mind, please try my branch's version of vim-plug, I'd like confirmation the issue is resolved. I am doing some additional testing/inspection of the python code in the interim.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/starcraftman/vim-plug/fix_freeze/plug.vim
@starcraftman Works like a charm now :)
Thank you!
I can confirm as well. Works flawlessly, even without ruby installed. Thank you very much :)
@ftzeng @nicolaiskogheim Happy to be of help, happy vimming.
vim freezes when I do
PlugInstall
. Strangely, it does not freeze when I run it from a fresh install.I set
g:plug_threads = 1
and that has resolved it. Is it because I have vim compiled without ruby? (It is compiled with python and python3). I was under the impression from the documentation that ruby isn't required and that python multithreading would be used if it wasn't available?This is on Ubuntu 14.04 in tmux.