9

I just downloaded and stated using the YCM plugin for vim. However I noticed that whenever the auto-complete pops up giving completion suggestions a split window also opens up in my current window. Any suggestions on how I can configure YCM to not open up a split window ? or at least shut the window when I select something.

James Franco
  • 4,516
  • 10
  • 38
  • 80

2 Answers2

15

In your .vimrc file add this line :

let g:ycm_autoclose_preview_window_after_insertion = 1

According to the documentation :

When this option is set to 1, YCM will auto-close the preview window after the user leaves insert mode. This option is irrelevant if g:ycm_autoclose_preview_window_after_completion is set or if no preview window is triggered. See the g:ycm_add_preview_to_completeopt option for more details.

For more infos : https://github.com/Valloric/YouCompleteMe#the-gycm_autoclose_preview_window_after_completion-option

Oussama Salimi
  • 274
  • 3
  • 9
3

Put this in your .vimrc:

set completeopt-=preview

I think it fixes that according to https://github.com/ycm-core/YouCompleteMe/issues/2015

fcdt
  • 2,371
  • 5
  • 14
  • 26