We all know that when we copy and paste between a file, Vim provides us with a lot of methods, three modes have a method to achieve the characters, sentences, paragraphs between the copy and paste. At that time, if
We want to copy and paste between two files, which is a bit of a hassle. The way I used to do this was to implement it in a window. The disadvantage of this is that each time you open a file. What's more, if there are too many differences between the two files > directories, it is very troublesome to open them. Furthermore, this method is not suitable for manipulating articles that require root permissions. There is the use of Ctrl+shift+c and ctrl+shift+c to copy and paste operation >. The drawbacks of this approach are even clearer because there are problems with formatting indentation.
Today I saw a method on the Internet, although this method is very troublesome to operate. However, it should be better than the two methods above. First look at the implementation method. This method I just in Ubuntu under the terminal > Operation success, as for the window on the Gvim do not know
1. Ensure that Vim-gnome is installed on your computer. If you do not have the installation, you execute the gvim command and you will be prompted with several Vim-related software that you may need. You directly use
sudo Install Vim-gnome
It's all right.
2. Then we can copy and paste the following command
" +y ( click "->+->y)- copy "+d (Point to->+->y)-copy
The above two are in the mode. If it is in normal mode, then use "+yy".
" +p ( click "->+->y)-Copy
In fact, this command and our YY p and so on as a copy of the file is very similar. If we take the "+" as a choice register it is better to understand. YY is using the default register, and this is > using the + register. The selection of registers is followed by the function operation, so, we are in the file operation, can also be used on the "+", but the front of a register just added. + This register, sense > Sleep should be the system register
Vim Cross-File replication