Vim on OSX: how to insert text from an open window into an open file in vim?

In linux, I used Shift+ Insertto paste something into the system clipboard in the terminal. There is no insertion key on the Mac - so I have to wonder how to do this?

+5
source share
3 answers

The standard Mac paste shortcut, Command-v, should paste the contents of the clipboard into vim, working in a terminal window, assuming vim is in paste mode. I just inserted the previous sentence into vim on my Mac, this method. If you're new to the Mac and you have an Apple keyboard, the Command keys have an apple and a strange octotorp-like character with a loop in each corner. On my third party keyboard they are marked with a diamond shaped symbol.

+6
source

This works with Macvim. The copied text is placed in the register +, and then macvim gets into the buffer "+p, and the text is inserted into the buffer. I find this faster than using the -v, comand-c commands.

vim, .. ".p, .

+4

Ubuntu Shift+ is Insertused to paste selected text, not to paste text copied to a buffer that was copied using Ctrl+ C.

In macOS This function inserts the selected text can be accomplished with the ⇧Shift+ ⌘Command+ V.

Hope this helps users who come from Ubuntu.

+4
source

All Articles