vim 101 hacks
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Buyer: xiujuan lu (luxiujuan@gmail.com)<br />
Transaction ID: 85W16630AD8515549<br />
Vim <strong>101</strong> Hacks<br />
www.thegeekstuff.com<br />
Hack 28. Inserting Content from Clipboard Buffer<br />
If you’ve copied text from a web browser, or any other application, you can<br />
paste it directly to the current open file in the Vim editor as shown below.<br />
Copy from clipboard<br />
SHIFT-INSERT<br />
Description<br />
Paste clipboard content to editor (ensure you<br />
are in insert mode first!)<br />
“*p<br />
Paste clipboard content to editor in normal<br />
mode<br />
Hack 29. Insert Content to Clipboard from File<br />
You may want to put text from the current file into the clipboard. Once the<br />
text is transferred to the clipboard, you can paste it into any other<br />
application.<br />
Copy to clipboard<br />
:%y+<br />
Description<br />
Copy the whole file to the clipboard<br />
:y+<br />
Copy the current line from the file to the clipboard<br />
:N,My+<br />
Copy the specific range from file to the clipboard<br />
57