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.
Asked
Active
Viewed 4,848 times
9
-
1Grep for `:sp` or `sp` or `split` or `:vs` or `:vsplit` in your plugin files. If you find it in any file , put those lines here. – SibiCoder Jul 23 '16 at 01:20
-
I'll update the post with the find – James Franco Jul 23 '16 at 02:03
-
This window is called the preview window. See: https://github.com/Valloric/YouCompleteMe#the-gycm_add_preview_to_completeopt-option – dNitro Jul 23 '16 at 03:21
2 Answers
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

Alireza Sadeghi
- 31
- 4