0

I am learning to use vim as an IDE for Python and followed this tutorial to setup my .vimrc file. My setup is working fine.

enter image description hereHere, vim shows me the help for np.random.randint, but I could not figure out how to scroll through the displayed help and read about the other parameters. This feature is introduced by YouCompleMe (as far as I understand), so possible solution might be to change some configuration for it.

Since, I am new to this, I am not even sure what this feature is called (auto complete does not seem to be the right name for displaying help) and therefore was not able to find help on web-searching.

Any help will be appreciated, thanks.

Manish Goel
  • 843
  • 1
  • 8
  • 21

1 Answers1

0

YouCompleteMe uses the Jedi library for Python. If you want to install Jedi alongside YCM, this answer has some advice on how to do so.

In any case, the extra docstring information is opened in a preview window, so you should be able to switch to it in normal mode (ctrl-w w) and scroll like a regular Vim window.

If the buffer disappears when you exit insert mode, here's some sample solutions:

  • If you're okay with enabling mouse controls, add set mouse=a to your VIMRC, and then you can click between the buffers while typing and even scroll using your mouse wheel or trackpad.

  • Remove let g:ycm_autoclose_preview_window_after_completion=1 from your VIMRC, since that will remove the preview window when you enter normal mode. Then, switch to the window normally.

  • Change the default preview height. Just be aware that this might be annoying if you have limited screen space.

Fishy
  • 26
  • 5