[wellylug] Staircase effect in vim...

Grant McLean grant at mclean.net.nz
Thu Feb 19 07:17:02 NZDT 2004


Cameron Hart wrote:
> But then you have to forsake lovely autoindent!  :)
> 
> Try using vim's paste mode. In vim type
> :set paste
> 
> go into insert mode and paste your text.
> 
> Paste mode should turn off all indenting and other features which can mess up 
> pasted text. When you have finished pasting, go out of insert mode, and type
> :set nopaste
> 
> refer to ":help paste" in vim, and ":help set" if need be.

Unfortunately, the original poster was using vim via an ssh connection. 
  In this case, paste is handled by putty firing the clipboard data 
across as if it had been typed.  Vim would have no way to distinguish 
between pasted text and typed text.  Your tip is good for gvim though.

In this case I'd recommend:

:set noai
paste
:set ai

Cheers
Grant

Regards
Grant




More information about the wellylug mailing list