3.3 copy VIM register to system clipboard Of course, there is a very simple solution to the higher version of vim: Shift + insert can paste directly.
The following is the official document:Ĭorresponding to the system clipboard used by Ctrl + C and Ctrl + V, *Ĭorresponding to the content selected by the mouse, you can paste it in the middle. They are the same on most systems, but may not be equivalent on some Linux. These two registers interact with the system clipboard. MacOS: sudo brew install vim 3.2 copy system clipboard to VIM In addition, the Debian system can install VIM GTK: sudo apt install vim-gtkįor RedHat system, vim-x11 and VIM enhanced need to be installed, and then add an alias: alias vi='vimx' My manjaro can be installed using yay, but the prompt is expired: If not, for example, the author does not support this. 3.1 view clipboard supportįirst, you need to know if VIM supports clip Edition: vim -version | grep clipboard Of course, the above method must not be what you want, so here is an elegant method. This is the simplest and more general method, which will not be affected by VIM’s support for clip edition and so on.
Use cat + grep and Ctrl + C terminal to copy. The content in VIM is copied to the system clip edition. When copying VIM from the system clip edition, create a new file, copy it directly with Ctrl + V and open vim.
#Vim mac os copy how to#
However, this register is not the system‘s clipping version, and the interaction between vim and the system’s clipping version is often required, so how to do? 2 violent settlement
The contents of copying, deleting and replacing (D, R, s, x, y, etc.) in VIM will be saved in the default unnamed register, which can be pasted through P later.