neoclide / coc-lists

Common lists for coc.nvim
264 stars 24 forks source link

macOS cmd-v not work #101

Closed ZhiruiLi closed 3 years ago

ZhiruiLi commented 3 years ago

When using vim under macOS, it is normal to use cmd-v to paste text. It works for vim buffer, vim command, but not work for CocList. Any idea for solving this?

Environment info:

macOS 10.15.7
## versions

vim version: NVIM v0.4.4
node version: v15.2.1
coc.nvim version: 0.0.79-1cf07be052
term: iTerm.app
platform: darwin
chemzqm commented 3 years ago

Because getchar can't use with paste, read :h coc-list-mappings-custom

ZhiruiLi commented 3 years ago

h coc-list-mappings-custom

But coc-list-mappings-custom can't accept cmd key mapping which starts with <D-:

Note: you should only use mappings that start with <C- or <A- for insert mappings.

chemzqm commented 3 years ago

It's terminal vim that can't make use of <D-, there's a prompt action to paste text from clipboard.

ZhiruiLi commented 3 years ago

It's terminal vim that can't make use of <D-, there's a prompt action to paste text from clipboard.

Even if I use VimR, I still can't map <D-. I don't understand, is it impossible to paste by cmd-v? By the way, cmd-v works well when using FZF.

chemzqm commented 3 years ago

You can't, I have said getchar can't work with paste mode, it's vim issue.

ZhiruiLi commented 3 years ago

Emm... I just wonder why other plugins like FZF can support this?

chemzqm commented 3 years ago

FZF runs in terminal, it not using getchar

ZhiruiLi commented 3 years ago

Thanks

chemzqm commented 3 years ago

It's possible to paste text by <cmd-v> in terminal, you can remap <cmd-v> to send <ctrl-v> to vim in your terminal profile, and remap <C-v> to prompt:paste in list.normalMappings of settings file.

ZhiruiLi commented 3 years ago

Oh, I should give it a try

chemzqm commented 3 years ago

It's bad idea since you can't paste in your teminal shell by using <cmd-v> any more.

ZhiruiLi commented 3 years ago

That's right, I've tried it and found it not suit to me

So sad