Coc.nvim: Can I use ctrl-c to close CoC's windows?

Created on 3 Apr 2019  ·  3Comments  ·  Source: neoclide/coc.nvim

Is your feature request related to a problem? Please describe.
I always map <C-c> to <ESC>. However, my mapping does not work in :CocCommand.

Describe the solution you'd like
I tried to map it but I found map does not work. How could I imap in the window popping up after :CocCommand?

Most helpful comment

It make use of getchar from vim, so your keymappings doesn't work, add

  "list.normalMappings": {
    "<C-c>": "do:exit"
  },
  "list.insertMappings": {
    "<C-c>": "do:exit"
  },

in your settings file opened by :CocConfig.

All 3 comments

It make use of getchar from vim, so your keymappings doesn't work, add

  "list.normalMappings": {
    "<C-c>": "do:exit"
  },
  "list.insertMappings": {
    "<C-c>": "do:exit"
  },

in your settings file opened by :CocConfig.

ahhhhhh thank you @chemzqm !

Using ctrl-c to close the floating window will sometimes cause line fragments to permanently remain on the screen, which added a lot of visual clutter to the editor. This fix made all parts of the floating menu to disappear, fixing a long-standing visual bug I experienced, so thank you for this @chemzqm !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marene picture marene  ·  3Comments

albertorestifo picture albertorestifo  ·  4Comments

lanox picture lanox  ·  3Comments

czepluch picture czepluch  ·  3Comments

cvlmtg picture cvlmtg  ·  3Comments