Pressing command-v in terminal mode does nothing.
I'd expect it to paste from the clipboard. Command-v pastes from the clipboard in all other modes, and appears to be unmappable in any mode (e.g. tnoremap <D-v> <C-w>"+ does nothing).
Ideally command-v would be mappable, and there'd just be default mappings that implement paste-from-clipboard. But if that's not possible, it'd be great if :terminal mode pasting worked like the other modes.
I was about to open a ticket on exactly this - so instead I'll leave a "me too".
Other mappings work fine - it's just Command-* mappings that don't appear to be mappable. tmap <C-v> <C-w>"+, for example, works fine - hitting ctrl-v with that mapping in place pastes the clipboard into the terminal session as expected.
I'm also experiencing this behavior in macvim, but it works fine if I use the origin vim in terminal.
This looks like the same underlying issue as in #714.
(At least, the mapping bit; the fact that pasting in general in terminal mode appears to do nothing is a different bug.)
I found that if I disable the MacVim menu feature by set guioptions+=M, I would be able to map <D-v>.
'M' The system menu "$VIMRUNTIME/menu.vim" is not sourced. Note
that this flag must be added in the .vimrc file, before
switching on syntax or filetype recognition (when the |gvimrc|
file is sourced the system menu has already been loaded; the
`:syntax on` and `:filetype on` commands load the menu too).
You can put macm Edit.Paste key=<nop> in your gvimrc (not vimrc) to clear the mapping of Cmd-V. Do :help :macmenu for more details.
That said it seems a bug you can't paste in Terminal mode. It's likely because the feature is still pretty new and it requires some hooks to enable.
So it looks like the macaction support for Command-V doesn't properly handle terminal mode - which I guess makes sense because it's a recent addition.
In the meantime, the following mappings, in you gvimrc file, will get Command-V working in different modes, including terminal mode:
macm Edit.Paste key=<nop>
tmap <D-v> <C-w>"+
nnoremap <D-v> "+p
vnoremap <D-v> "+p
inoremap <D-v> <C-R><C-O>+
cnoremap <D-v> <C-R><C-O>+
There are probably some modes I've missed though...
Just to elaborate, the issue here is that Cmd-V by default is mapped to the menu "Edit.Paste", so if we could modify menu.vim so that Edit.Paste will also paste in Terminal, that would be great. Unfortunately there's currently no way to map a menu item in Terminal mode now, presumably since tmenu actually means adding a tooltip.
Also, just as an aside, there's also no way to copy in terminal mode right now, and you have to use <C-\><C-N> to jump to normal mode first.
These probably need to be fixed in Vim first.
Terminal menu support in Vim has been added in 4c5d815256099b50eca2ec5bf8f9aaa67a890211 (also see vim/vim#3439), so Cmd-V to paste will work now. This issue can be closed.
Edit: This also means you can now map toolbar / TouchBar controls for terminal mode now since they rely on the menu system.
As commented, Cmd-V paste now works. The next release will contain this change. The best way to check is to make sure :version is bigger than 8.1.0487.
Most helpful comment
I was about to open a ticket on exactly this - so instead I'll leave a "me too".
Other mappings work fine - it's just Command-* mappings that don't appear to be mappable.
tmap <C-v> <C-w>"+, for example, works fine - hitting ctrl-v with that mapping in place pastes the clipboard into the terminal session as expected.