when copy and paste in vi it automatically inserts many annoying indents and tabs. To disable the auto indents and formatting, use this command before you paste
:set paste
and paste your codes. After that, set it back
:set nopaste
November 7, 2008
when copy and paste in vi it automatically inserts many annoying indents and tabs. To disable the auto indents and formatting, use this command before you paste
:set paste
and paste your codes. After that, set it back
:set nopaste
January 28, 2009 at 9:09 am
My version of VI must be old as I don’t have this option. Turning off autoindent worked for me:
:set noautoindent