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

Re: pasting into vi inserts many indents



On Tuesday 18 November 2003 01:27 pm, Brian wrote:
> Hi,
> Lately, if I open a file with vi from inside a gnome-terminal and then
> select a large chunk of text, (it doesn't matter where, e.g., Mozilla or
> the same vi session, both do it), it corrupts the formatting with many
> indents.  The pasted output inserts more indents on each line than there
> were on the previous line to create a "cascading formatting".  Can someone
> point me to how I can stop this?  I know I can fix past problems with
> cat file | tr -d '\t' , but how can I stop the bug in the first place?
> However, I can't get it to do it now for an example.
>
> Brian
>
> --

This is due to a vi setting, autoindent.  Try typing :set noai before pasting 
text.  If you want ai back on, :set ai.  :help ai for more info.

If that's not it, I may need more details.

Justin



Reply to: