Vim : youCompleteme plugin opens up a split window with function definition
Asked Answered
P

2

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.

Polygyny answered 22/7, 2016 at 19:50 Comment(3)
Grep 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.Bellarmine
I'll update the post with the findPolygyny
This window is called the preview window. See: github.com/Valloric/…Jonis
P
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

Pundit answered 16/3, 2017 at 1:56 Comment(0)
M
3

Put this in your .vimrc:

set completeopt-=preview

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

Matthewmatthews answered 11/8, 2020 at 19:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.