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.

       [...]
Since "pasting" usually has dedicated or no keystrokes (shift+insert/control+v
or middle/right mouse button), is there a way for me to tell vim that ai, cin,
or si should not interfere when I do pasting?

I think the above will do what you want.

I mostly work on unix platforms, so unix-only solution also works for me.

This works in vim6 and 7.  Definitely 7, pretty sure about 6.


Thanks.

Ben K.
Developer
http://benix.tamu.edu

       HTH
       Hugh



Regards,

Ben K.
Developer
http://benix.tamu.edu

Reply via email to