In linux, I used Shift + Insert to paste anything in the system clipboard into the terminal. In Mac, there isn't an insert key - so, I'm left wondering how to do that ?
In this mode, you can run Vim commands and navigate through the file. To go back to normal mode from any other mode, just press the Esc key. Vim has its own terminology for copying, cutting, and pasting. Copy is called yank ( y ), cut is called delete ( d ), and paste is called put ( p ).
We can use the “+p and <Ctrl+r>+ in normal and command mode, respectively. However, it might be more convenient if we use the <Ctrl+Shift+v> hotkey since it does the same thing as “+p. Similarly, <Ctrl+Shift+c> will yank the text into the + register to be available for pasting outside of Vim.
The standard Mac paste shortcut, Command-v, should paste the contents of the clipboard into vim, running in a terminal window, assuming vim is in insert mode. I just pasted the previous sentence into vim on my Mac, by that method. If you are new to Macs, and you have an Apple keyboard, the Command keys have an apple and a strange symbol resembling an octothorpe, with a loop at each corner. On my 3rd party keyboard, they are labeled with a diamond-shaped symbol.
This works with Macvim. The copied text is placed in the +
register then in the macvim buffer hit "+p
and the text will be pasted into the buffer. I find this quicker than using command-v,comand-c.
If you're using console vim then it is placed in the .
register. Hit ".p
to paste the text from the clipboard.
In Ubuntu, Shift+Insert is used to paste highlighted text, not to paste text copied in the buffer that was copied using Ctrl+C.
In macOS this functionality of pasting highlighted text can be done with ⇧Shift+⌘Command+V.
I hope this helps any users that are coming from Ubuntu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With