I'm on my 4th clean install of YouCompleteMe. I am trying to get to work with a Python file after a . (such as foo....Then I hit <C-space> and would hope to see a list of options to complete with), but so far, nothing seems to be getting through.

This is the situation:

i  <C-Space>   * <C-X><C-O><C-P>
    Last set from ~/dotfiles/vim/.vim/bundle/youcompleteme/autoload/youcompleteme.vim

From .vimrc:

let g:ycm_python_binary_path = '/usr/bin/python'
let g:ycm_server_python_interpreter = '/usr/bin/python2'
let g:ycm_min_num_of_chars_for_completion = 2

And I've got no errors or warnings from the YcmDiags or any other YCM logs.

If I go ahead and type 2 characters (assuming they match a possible completion), the completions appear very quickly, so I believe the call is being made and serviced properly in that context. It's just calling it up manually with the key-binding is unresponsive.

I'm running xfce4-terminal and using zsh with oh-my-zsh, but I hope nothing there would be the culprit, like for example the terminal is blocking <C-space> from getting to Vim.

Oh, and I'm running Vim 8.0 on Arch Linux.

1 Answer 1


You actaully need to map to <Nul>, not to <C-Space> - looks strange I know, but I learned that recently trying to map to <C-Space>. I looked how it's done in CtrlSpace plugin, and it's using <Nul> for that. The reason is that your terminal probably send's ^@ (Nul character/sign) on Ctrl-Space - you can check that in Insert Mode by pressing Ctrl-v Ctrl-Space. The downside is that <Nul> can be triggered from other key sequences, not only Ctrl-Space.

Edit: Here's a related SO answer with a bit different approach. It maps <Nul> directly to <C-Space>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.