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

Re: vim, tabs, and copying text



On Thu, 10 Apr 2003, 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?

In command mode, type

:set paste

That will turn off autoindent and a few other settings so what you paste
goes in properly. When you're done, enter

:set nopaste

And all will go back as it was.

:help paste

...for the details.

- Aaron

-- 
Aaron Hall           :         I the hari kari again will make equal.
ahall@vitaphone.net  :         -- Hawkeye Pierce, via French and German



Reply to: