Since you're trying to configure vim I'll assume you want to edit the file in vim. The .vimrc file is usually located in your home directory.

vim ~/.vimrc
autocmd FileType python setl tabstop=4|setl shiftwidth=4|setl softtabstop=4
autocmd FileType html setl tabstop=2|setl shiftwidth=2|setl softtabstop=2
autocmd FileType javascript setl tabstop=2|setl shiftwidth=2|setl softtabstop=2
autocmd FileType css setl tabstop=2|setl shiftwidth=2|setl softtabstop=2
autocmd Filetype ruby setlocal tabstop=2|setl shiftwidth=2|setl softtabstop=2

Feel free to adjust the values based on your preferences and coding conventions you use.

Eat 'em, freeze 'em, enjoy 'em all week long!
Tayler Tayler (75)
35 minutes

Nothing says good morning quite like a breakfast sandwich. From the doughiness of the muffin to the eggs' fluffiness to the cheese's gooeyness, breakfast sandwiches are a great start to your morning.