For autocomplete, any way to go back to normal mode after autocomplete selection is inserted? #3816
Unanswered
jamischarles
asked this question in
Q&A
Replies: 1 comment
-
You have to write a function with timer to feed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
LOVE coc!
This is more of a question.
I'm using autocomplete and this keymapping:
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
Works great.
However, I'm trying to automatically go to
normal
mode after the insertion is completed.For the life of me I cannot figure out how to do that.
inoremap <expr> <cr> pumvisible() ? "\<C-y>\<Esc>" : "\<C-g>u\<CR>"
Ignores the completion, and goes to normal modeinoremap <expr> <cr> pumvisible() ? "\<C-y>\<C-]>" : "\<C-g>u\<CR>"
Ignores the completion, and goes to normal modeinoremap <expr> <cr> pumvisible() ? "\<C-y>Hello" : "\<C-g>u\<CR>"
Ignores completion, insertsHello
.Any ideas?
Thanks and keep up the great work!
Beta Was this translation helpful? Give feedback.
All reactions