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

Re: pasting into vi inserts many indents

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.

    :r ! cat


:set pastetoggle=<F9>

instead of F9 you can use another key too. In this case if you want to insert a selected text, change with F9 to paste mode, paste the text, then with F9 change back to normal insert mode. At the bottom vi gives you info in which mode you are. (you can press F9 in insert mode too)


Reply to: