Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot choose method/class/etc. #162

Closed
Relrin opened this issue Aug 16, 2013 · 13 comments
Closed

Cannot choose method/class/etc. #162

Relrin opened this issue Aug 16, 2013 · 13 comments

Comments

@Relrin
Copy link

Relrin commented Aug 16, 2013

I'm trying to install jedi-vim with Vundle plugin, and typing this "example":

import math
math.

fter dot i get popup with autocomplete. Really not bad, but, i cant choose function/method/class/etc. what i want (arrows somehow doesn't worked, when show popup with autocomplete and preview of first function/method/class/etc. which automatically selected)

At my .vimrc file:

let g:jedi#popup_select_first = 0
let g:jedi#goto_command = "g"
let g:jedi#get_definition_command = "d"
let g:jedi#rename_command = "r"
let g:jedi#related_names_command = "n"
let g:jedi#autocompletion_command = ""

P.S. Maybe incompatible with some plugin, which installed also by Vundle: NERDTree, NERDCommenter, TagBar, minibufexpl.vim, FixedTaskList.vim, conque-term, vim-snippets, vim-snipmate, vim-addon-mw-utils, tlib_vim, git-vim, vim-gitgutter, vim-airline, python-mode?

@davidhalter
Copy link
Owner

can you uninstall python-mode? And check again?

@Relrin
Copy link
Author

Relrin commented Aug 16, 2013

I'm trying to uninstall python-mode and run without him. Nothing has changed.

@Relrin
Copy link
Author

Relrin commented Aug 16, 2013

At python-mode im already set off autocomplete with this beforehand:
let g:pymode_rope = 0

@davidhalter
Copy link
Owner

What's your :ver?

And you realize that you're assigning let g:jedi#autocompletion_command = "", which might lead to bugs?!

@Relrin
Copy link
Author

Relrin commented Aug 19, 2013

Im set to
let g:jedi#autocompletion_command to Ctrl+Space (at this commit didnt correct write)
and my VIM version is 7.4
But nothing is changed

@Relrin
Copy link
Author

Relrin commented Aug 19, 2013

Can I somehow off preview of chosen function at autocomplete? Maybe its help's me?

@davidhalter
Copy link
Owner

and my VIM version is 7.4

No: Run :ver!

Can I somehow off preview of chosen function at autocomplete?

Yes you can switch of the preview if that helps:

:set completeopt -=preview

@Relrin
Copy link
Author

Relrin commented Aug 20, 2013

from :ver at VIM:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 12 2013 09:17:12)
Огромная версия с графическим интерфейсом GTK2-GNOME. Включённые (+) и отключённые (-) особенности:
+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_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

Also im set at my .vimrc file:
autocmd FileType python set completeopt-=preview
and all now good work :)

@davidhalter
Copy link
Owner

If it works now, i'm going to close. Feel free to comment if there's still an issue.

@neonsamurai
Copy link

I have the same issue. I think it might be related to NERDTree. Here is what I experience:

When I close NERDTree before editing everything seems to kinda work. Except that PowerLine can't display info from the hsplit which displays pydoc for the auto complete items.

When NERDTree is open and I invoke auto completion everything works fine until I get to a method. Then several things happen:

1.: vim opens a hsplit above the buffer I am editing in with the pydoc of the object/method (see screenshot below)
2.: the preview opens with auto complete suggestions
3.: vim enters a weird state where I seemingly am still in insert mode, but can only issue command mode commands. and there seems to be no way to reenter insert mode. 'i', 'o' don't work, 'ESC' doesn't seem to do anything etc. I have to restart vim to restore state. I believe vim thinks focus is still in the preview or something?

Other observations:

  • when I :bd the buffer I am editing in, it vanishes, but the preview window persists.
    other vundles that maybe have an effect: MiniBufExplorer, TagBar

Screenshot:

:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 29 2013 00:51:06)
Included patches: 1-41
Compiled by tim@tim-virtual-machine
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +cmdline_info +emacs_tags -hangul_input +menu +mouse_xterm -python3 +syntax +virtualedit +xsmp_interact
+arabic +comments +eval +iconv +mksession +multi_byte +quickfix +tag_binary +visual +xterm_clipboard
+autocmd +conceal +ex_extra +insert_expand +modify_fname +multi_lang +reltime +tag_old_static +visualextra -xterm_save
+balloon_eval +cryptv +extra_search +jumplist +mouse -mzscheme +rightleft -tag_any_white +viminfo +xpm
+browse +cscope +farsi +keymap +mouseshape +netbeans_intg +ruby -tcl +vreplace
++builtin_terms +cursorbind +file_in_path +langmap +mouse_dec +path_extra +scrollbind +terminfo +wildignore
+byte_offset +cursorshape +find_in_path +libcall -mouse_gpm -perl +signs +termresponse +wildmenu
+cindent +dialog_con_gui +float +linebreak -mouse_jsbterm +persistent_undo +smartindent +textobjects +windows
+clientserver +diff +folding +lispindent +mouse_netterm +postscript -sniff +title +writebackup
+clipboard +digraphs -footer +listcmds +mouse_sgr +printer +startuptime +toolbar +X11
+cmdline_compl +dnd +fork() +localmap -mouse_sysmouse +profile +statusline +user_commands -xfontset
+cmdline_hist -ebcdic +gettext -lua +mouse_urxvt +python -sun_workshop +vertsplit +xim
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/share/vim"
f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
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/incl
ude/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/incl
ude/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/local/include -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic -Wl,-export-dynamic -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 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -l
m -ltinfo -lnsl -lselinux -ldl -L/usr/lib/python2.7-config -lpython2.7 -lruby1.8 -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib

@davidhalter
Copy link
Owner

@neonsamurai No idea what that could be. But it doesn't look like a jedi-vim problem. Since jedi-vim just uses the default autocompletion functionality without modifying anything (that hsplit is not something that jedi-vim does. That's default omnifunc behaviour). So I guess you have to really figure out what causes this - jedi-vim just typically isn't causing those things.

@kreedz
Copy link

kreedz commented Mar 10, 2015

I have the same problem.
animation

As you can see there [No Name] buffer appears when you reach third frame and almost whole selection window disappears (a small piece remains on the statusline). But i'm not sure that it is the "buffer", because :ls command don't shows this "buffer".

And I founded the cause.
In my .vimrc, the following command:
let g:airline#extensions#tabline#enabled = 1
does this:
'Automatically displays all buffers when there's only one tab open.'
If you disable this then the problem disappears. But i don't want to disable this command. How i can avoid this?
I do not know whose exactly it is a problem (jedi or airline).

Ok. I found a solution. My vim version was 7.3.547.
I've updated my vim to 7.4.488 after reading this issue comment. And problem is gone except of some blinking.

@davidhalter
Copy link
Owner

Thanks so much for the comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants