Vim: Enough tabs already
Scenario:
You are connected to a Linux webserver via a Windows terminal client such as PuTTy. You copy some text to paste into a Vim document open on the remote machine and you get tab hell:
Here's an example of something I pasted in tonight:
ServerAdmin webmaster@host.some_domain.com DocumentRoot /home/bealers/www ServerName bealers.com ErrorLog /var/log/apache/bealers.com-error.log CustomLog /var/log/apache/bealers.com-access.log common Options Indexes
To fix this globally you can edit, as root, /etc/vim/vimrc (or similar) so that this line is commented out, or add it if not there:
set autoindent
else edit your vimrc file ~/.vimrc
Related: http://www.vim.org/tips/tip.php?tip_id=330
Next Vim tip: Removing DOS linebreaks from your files using Vim.