Ben K. wrote:

Thanks much.

On Fri, 9 Feb 2007, Hugh Sasse wrote:

On Fri, 9 Feb 2007, Ben K. wrote:


Hi,

Whenever I paste something into vim, it gets staircased. Is there a way to avoid copy/paste being staircased even when I have ai, cin or si turned on? I

Yes, set paste.  See
:he paste
for more on this.  Also
:he pastetoggle
is good

I have in my .vimrc:

nmap <M-R> :exe ":undo|:set paste|:normal .:set nopaste"
set pastetoggle=<f1>


The first line of which is to redo a botched paste, the second of
which is to make the <F1> key turn this on an off.  For me that only
works in inset mode.  Maybe someone can improve on this.

I use this (it's in my .vimrc):

                        "# <F9>     - toggle paste
                        "#            (must have 'pastetoggle' set)

set pastetoggle=<F9>        " toggle 'paste' option

map <F9>        :set invpaste paste?<CR>
imap <F9>   <C-O>:set invpaste<CR><C-O>/<BS>

It works both i normal as well insert mode.
Hit <F9> in normal or insert mode and the 'paste' option
will be inverted but also displayed at the bottom of your window.
Stays until you hit <F9> again.

Regards,

---Zdenek

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to