macvim icon indicating copy to clipboard operation
macvim copied to clipboard

getchar() can not detect cmd-v on MacOS

Open Yggdroot opened this issue 5 years ago • 3 comments

https://github.com/vim/vim/issues/5349

Yggdroot avatar Jul 31 '20 05:07 Yggdroot

Per the comment in the other issue (https://github.com/vim/vim/issues/5349#issuecomment-670200900), MacVim currently hard-binds Cmd-V to a menu key, and as such you cannot use it in Vim mapping unless you unmap it from the menu. Does that work for you? Or are you asking for a way to bypass that completely?

ychin avatar Aug 11 '20 09:08 ychin

I don't know how to unmap it from the menu. It would be preferred if there is a way to bypass that completely.

Yggdroot avatar Aug 17 '20 06:08 Yggdroot

You can look up the documentation by doing :help macmenu, under example 4:

4. Free up Cmd-t and remap it to open a file browser in a split view: >
	macm File.New\ Tab key=<nop>
	nmap <D-t> :sp .<CR>

You will need to do this for each menu item you care to unmap for.

ychin avatar Aug 17 '20 07:08 ychin