Closed 0xadb closed 6 years ago
I can't reproduce the issue. Did you remap the <Enter>
key? Does the command
:inoremap <Enter>
return anything? By default, the <Enter>
key should always insert a new line even in completion mode. If you want this key to confirm the selection instead of inserting a new line, you should add it to the g:ycm_key_list_stop_completion
option:
let g:ycm_key_list_stop_completion = [ '<C-y>', '<Enter>' ]
By the way, you should be able to install YCM with the install.py
script instead of following the full instructions on Debian. The command
./install.py --clang-completer
should work. Don't worry if it's downloading the Clang binaries for Ubuntu 14.04. They are compatible with Debian.
:inoremap <Enter>
i
I am a moron, totally forgot about OmniCompletion enabled:
"" Enable OmniCompletion
" http://vim.wikia.com/wiki/Omni_completion
filetype plugin on
set omnifunc=syntaxcomplete#Complete
" "
" " " Configure menu behavior
" " " http://vim.wikia.com/wiki/VimTip1386
set completeopt=longest,menuone
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
I'm sorry and thank you.
Works now as I expect it to.
Issue Prelude
vim --version
.:YcmDebugInfo
.:YcmToggleLogs
command.install.py
(orcmake
/make
/ninja
) including its invocationIssue Details
On Debian 9.4 I upgraded Vim from 8.0 (from repo) to 8.1 (from sources, following instructions from Full Installation Guide), i.e.:
int main () { Struct s; s // enter '.', select an item and hit 'Enter' return 0; }