How to make the preview window pop up manually for a method description?

I'm developing in Python. When I'm typing a method name, for example my_object.some_method() while I'm typing some_method() a popup appears, and arrowing down through it I see the preview window opened up and showing great information about the method.

I would like to know how I can manually pop up that preview window for a method description (that the cursor is on top of) so I can navigate to the preview window and read, scroll, etc.

I can't seem to figure this out. I read all through :h preview-window but nothing seemed to answer the question there.

Any help is much appreciated, thank you in advance!

Posted Apr 4, 2017, 10:17 AM UTC

1711
josuf107•

I'm pretty sure it's your jedi-vim plugin that is producing the preview window (https://github.com/davidhalter/jedi-vim). You should consider reading the help for the plugin :help jedi-vim but I glanced at it at https://github.com/davidhalter/jedi-vim/blob/master/doc/jedi-vim.txt and noticed that K is mapped to jedi#show_documentation() which I think is what you want. It's a sensible choice because K normally executes helpprg for the keyword under the cursor. If you're doing python that's probably the sort of help you'd want.

TLDR: Try pressing K on a method.

3
thomas_stringerOP•

Perfect, thanks so much!

1
ImKillua•

What plugins are you using?

1
thomas_stringerOP•

Here is my .vimrc.

1
ragnar_graybeard87•

Try pressing ctrl-w ctrl-w when it appears

1
thomas_stringerOP•

That doesn't do it for me. The first ctrl-w closes the preview window and deletes the partial or full method name. The second one has no effect.

1
ragnar_graybeard87•

Oh yahh. Cuz yur in insert mode, oops... add this to your vimrc:

set mouse=a

Now when that window pops up u should be able to click on it then youll be in it

1
ajax98•

I think that's part of jedi-vim, would look at those docs to find out.

1