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.
It's not a bug, it's a feature called auto-indent.
:set noai
If you're using vim.
:set paste
When done pasting
:set nopaste
-- Steve C. Lamb | I'm your priest, I'm your shrink, I'm your PGP Key: 8B6E99C5 | main connection to the switchboard of souls. -------------------------------+---------------------------------------------
pgp00000.pgp
Description: PGP signature