For some reason, Vim keeps using soft-tabs (tabs as spaces) everytime I’m working on Haml files. I prefer regular tabs and have the following in my vimrc:
set autoindent
set noexpandtab
set tabstop=4
set shiftwidth=4
Which seems to work great for every file type except for Haml. When editing Haml files Vim uses two spaces rather than a tab, any suggestions as to how this can be reverted back to my default settings (ie. regular tabs)?
It was because the indent script for haml sets expandtab for you automatically when VIM has detected the current file is in haml format. The script is located at
$VIMRUNTIME/indent/haml.vim. It contains:To disable that, you can put this line in your
~/.vimrcto clear the expandtab setting again: