Monday, February 9, 2009


You can add an auto command to your vimrc to have it automatically executed when a certain type of file is loaded. As an example, I use the following to convert tabs to spaces when a PHP file is loaded.

auto BufReadPost *.php retab!

See :help auto for the full info.

1 comment:

graywh said...

Also, you can use filetype plugins (ftplugin) to change settings and do other things based on the recognized 'filetype'.