When there are multiple complete suggestions from Vim plugin YouCompleteMe, how do I accept the one I want ?
What I currently do is pressing Esc key, I just want to know if I got it right.
When there are multiple complete suggestions from Vim plugin YouCompleteMe, how do I accept the one I want ?
What I currently do is pressing Esc key, I just want to know if I got it right.
To accept the current insert completion entry use <c-y>
. Think of it as "yes".
For more help see:
:h complete_ctrl-y
Ctrl-Y
is default, but you can add other key bindings by adding this line to your .vimrc
:
let g:ycm_key_list_stop_completion = ['<C-y>', '<CR>']
In this ^ example, you can use either Ctrl-Y
or Enter
to accept the completion and free up the cursor.
For some reason, I think that you didn't really read the documentation and/or the README:
When the user sees a useful completion string being offered, they press the TAB key to accept it. This inserts the completion string. Repeated presses of the TAB key cycle through the offered completions.