Theerasak Photha wrote:
On 2/15/07, Lev Lvovsky <[EMAIL PROTECTED]> wrote:
I often find myself copy/pasting via my GUI text that I might have on
the screen, and then pasting it into the command to be performed - is
there any way to cut/paste text into the command area when I have it
highlighted with just the keyboard?

Assuming you're talking about ex commands, yes.

You can type <Ctrl-R> to insert a register, then the name of any
register, including the expression register, =. In your case, the name
would probably be '+', so <Ctrl-R>+.


Of course, you should first copy the text to the clipboard in whatever program you're pasting from. Register + is "the Vim name" for the clipboard. Under Windows, but not under X11, register * is another name for the same thing.

If you're pasting within a single instance of Vim, then you don't have to go through the clipboard: just yank any text using one of the following:

        y{motion}
to yant what the cursor moves over, or
        [count]yy
to yank one (or [count]) line(s), or
        {Visual}y
to yank the highlighted text;

then, in Command-line mode or in Insert mode, Ctrl-R " (i.e., control-R-for-Romeo double-quote) will insert the default register (containing whatever you just yanked).

Best regards,
Tony.
--
But soft you, the fair Ophelia:
Ope not thy ponderous and marble jaws,
But get thee to a nunnery -- go!
                -- Mark "The Bard" Twain

Reply via email to