Thursday, March 25, 2010

Re: paste via "shift+insert" in gnome-terminal sucks when set fo+=cro

Hi,

On Fri, Mar 19, 2010 at 12:31 AM, John Beckett <johnb.beckett@gmail.com> wrote:
> Ryan J M wrote:
>> when I paste C code from another vim (located at
>> another gnome-terminal tab) to my working vim, "shift+insert"
>> auto commented and aligned the code, which is not what I
>> want. After a quick search using google, I found a
>> workaround, ":set paste" before I press
>> shift+insert.
>
> What you are supposed to do is use pastetoggle as shown here:
> http://vim.wikia.com/wiki/Toggle_auto-indenting_for_code_paste
>

You can also use CTRL-R CTRL-O * to paste the contents of the clipboard
(primary selection for X11) literally without any indentation. You don't
need to use the 'paste' option for this.

The following commands can be used in the insert mode to paste text
with and without indentation:

CTRL-R : Insert text from a register as though you typed it
CTRL-R CTRL-R : Insert text literally
CTRL-R CTRL-O : Insert text literally without indentation
CTRL-R CTRL-P : Insert text literally and fix the indent

Read the following help topics

:help i_CTRL-R
:help i_CTRL-R_CTRL-R
:help i_CTRL-R_CTRL-O
:help i_CTRL-R_CTRL-P

- Yegappan

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: