Replies: 5 comments 14 replies
-
inoremap <silent><expr> <cr> coc#pum#visible() && coc#pum#info()['index'] != -1 ? coc#pum#confirm() :
\ "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" |
Beta Was this translation helpful? Give feedback.
-
Is coc.mov inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1):
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh() |
Beta Was this translation helpful? Give feedback.
-
This doesn't seem to be working for me. The code you suggested only works if I change the keybinding to |
Beta Was this translation helpful? Give feedback.
-
Okay. Just tried it with this .vimrc:
It still did not work. I ran |
Beta Was this translation helpful? Give feedback.
-
the example still uses tab https://github.com/neoclide/coc-snippets#examples |
Beta Was this translation helpful? Give feedback.
-
Before the recent updates, following keymap would let me do:
<cr>
whould just do a normal enter and go to next lineThis was my mapping:
How do I convert that to new API. I have tried following, but it's not working the way I want it:
What I want is if popumenu is active and I have not selected anything, then hitting
<cr>
should just act as if there was no popup. This is helpful when I want to finish a line and go to next by hitting<cr>
without selecting any of the suggestions in the popupmenu. Basically, if nothing is selected and<cr>
is hit, just cancel the popupmenu and do<cr>
Same question for the following:
Beta Was this translation helpful? Give feedback.
All reactions