Working in data I often had tab delimited files. So you'd want your tabs to show up as real tabs when typed and not converted to spaces. Otherwise for code convention is almost always spaces. So I use this.
syntax on
filetype plugin indent on
:set paste
set shiftwidth=4
set tabstop=4
autocmd FileType ruby,eruby,yaml,java,clojure,html,css,xml
\ setlocal shiftwidth=2 |
\ setlocal tabstop=2 |
\ setlocal expandtab