[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vim, tabs, and copying text



On Thu, Apr 10, 2003 at 09:35:14PM +0200, Torquil Macdonald wrote:
> I have the following problem with vim inside an xterm:
> If I write a file with a TAB at the start of each line in VIM, and try to copy 
> and paste it, with the mouse, into another VIM running in another xterm, I 
> get one extra TAB for each line like this:
> 
> 	lkk
> 	kh
> 	kjh
> 
> becomes
> 
> 	lkk
> 		kh
> 			kjh
> 
> I also get this when copying from other programs into VIM. Any ideas?

That's auto-indent. Type ':set paste' in command mode before pasting
into vim, and ':set nopaste' afterwards. You can also put something like
'set pastetoggle=<F11>' in ~/.vimrc, so that you can simply press F11 to
switch between paste and no-paste mode.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: