Linger clipboard materials in vi
If I intend to replicate message from a documents in
vi to an additional documents, I need to highlight the message, Control-Shift-C it, gave up the first documents, open the 2nd, and afterwards paste it using Control-Shift-V. It seems like there have to be a less complicated means to do this - that is, key-board regulates just. Any kind of pointers?
While editing and enhancing a documents you can make use of
:e filename to open an additional documents and also
:rew to go back to the initial documents similar to this :
- open initial documents
- tug message as an example
yy(tug a line)
- open a 2nd documents to modify
ESC :e bar
- place your message
p(after that conserve
- return to the first documents
vim can be set up with X clipboard assistance. Pass - - with - x = yes to set up if your circulation does not pack vim with X assistance. By default the X clipboard is readily available as the * barrier and also the X reduced board (option) is readily available as the" barrier, so picking an area and also keying
"+y will certainly tug the option to the X reduced board, and also
"*y will certainly tug to the X clipboard. In a similar way,
"*p will certainly paste from the X clipboard and also
"+p from the X option.
You can set the default (confidential) barrier in vim to be the X clipboard by running
set clipboard=unnamed. After that you can simply
y and also
p from the X clipboard straight.
- Open your documents :
- In your documents, open the 2nd : ESC :open bar
- Return to the first : ESC :prev
- To replicate the web content of the documents : ESC :1,$ y
- To go the next documents : ESC :n
- Paste it : ESC p
Maybe there's a much shorter means?