# -+- number -+- category -+- title -+- email -+- name -+- homepage -+- clickOnName -+- language -+- image -+- browser-used -+- security-cookie =0 -+- 2002-04-02:2 -+- UNIX Basics -+- Pasting text in vi looks horrible, solution? -+- rene.vanleeuwen@bigfoot.com -+- Rene van Leeuwen -+- -+- nolink -+- English -+- -+- Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010802 -+- 5207 In some configurations, when you paste text in a vi-screen, it looks all horrible with increasing amounts of spaces and tabs in front of every line. What is wrong?
If you do :set, you probably see the property 'autoindent'. You can shut that off with :set noautoindent for the current vi-session and paste your text again.
A more permanent solution is to open the file ~/.vimrc and comment the line with 'set autoindent' (or set ai) out. Start vi again and the property 'autoindent' should be gone.

For people who use vim as a vi editor there is as well the possibility to use
:set paste
In case of vim this is better because vim has not just autoindent mode but as well smartindent and other indenting modes. :set paste resets all of those modes. When you are ready with pasting you can use :set nopaste