(Change to TipImported template + severe manual clean) |
(Insert TipProposed template + minor manual clean) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
{{TipImported |
{{TipImported |
||
|id=771 |
|id=771 |
||
− | |previous= |
+ | |previous=769 |
− | |next= |
+ | |next=773 |
|created=August 17, 2004 |
|created=August 17, 2004 |
||
|complexity=basic |
|complexity=basic |
||
Line 9: | Line 9: | ||
|version=5.7 |
|version=5.7 |
||
|rating=-2/2 |
|rating=-2/2 |
||
+ | |category1= |
||
+ | |category2= |
||
}} |
}} |
||
Bind a keystroke to "xclip -o | gvim -" ( or "xcb -p 0 | gvim -" or "any command which prints the contents of the clipboard | gvim -") |
Bind a keystroke to "xclip -o | gvim -" ( or "xcb -p 0 | gvim -" or "any command which prints the contents of the clipboard | gvim -") |
||
Line 34: | Line 36: | ||
---- |
---- |
||
This seems complicated. Simply use commands: |
This seems complicated. Simply use commands: |
||
− | |||
<pre> |
<pre> |
||
:new |
:new |
Latest revision as of 03:50, 6 January 2010
Tip 771 Printable Monobook Previous Next
created August 17, 2004 · complexity basic · author Peter Wilson · version 5.7
Bind a keystroke to "xclip -o | gvim -" ( or "xcb -p 0 | gvim -" or "any command which prints the contents of the clipboard | gvim -")
Pressing that key now captures the contents of the clipboard in a new Vim window.
Comments[]
I don't have xclip. I just click middle mouse button to paste clipboard, also in Windows gvim.
For scripting you could also paste the clipboard register: "*p
You can also do
gvim.exe -c 'normal "*p'
or to a named file
gvim.exe -c 'normal ggdG"*p' file.txt
from VimTip305
Put the paste code into a windows batch or Unix Script.
This seems complicated. Simply use commands:
:new "*p