Tabs vs. Spaces

While most people seem to be strongly opinionated when it comes to tabs vs. spaces for indenting their code, I honestly don't care. My biggest problem is when I edit other people's files and everyone uses different indenting styles. Really all I want is vim to be smart enough to detect if an existing file is using tabs or spaces (and of course how many spaces) and do the right thing. Today I found the DetectIndent vim plugin that appears to solve my problem. To have it always on simply add the following to your .vimrc:

autocmd BufReadPost * :DetectIndent