RSS

Vim: Enough tabs already

Sun, Apr 2, 2006

System Administration

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:

[code]
ServerAdmin webmaster@host.some_domain.com
DocumentRoot /home/bealers/www
ServerName bealers.dev
ErrorLog /var/log/apache/bealers.dev-error.log
CustomLog /var/log/apache/bealers.dev-access.log common

Options Indexes

[/code]

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:
[code]set autoindent[/code]

else edit your vimrc file ~/.vimrc

Related:
http://www.vim.org/tips/tip.php?tip_id=330

, , ,

This post was written by:

Bealers - who has written 350 posts on Darren Beale.


Contact the author

Leave a Reply