I have the following vimrc configuration which is working fine for Python files:
execute pathogen#infect()
syntax on
filetype plugin indent on
set tabstop=4
So when I press tab it's an alias to 4 spaces.
But it doesnt seem to work with JavaScript files.
When I press tab it always add a tab plus 2 spaces for every indentation. I am ok with the two spaces but how can I replace that tab with 4 spaces?
All the code is indented with spaces I dont want start adding tabs/spaces mix
I know you can specify the tabs/spaces for specific files but I cant make it work
autocmd FileType javascript setlocal shiftwidth=1 tabstop=4
expandandunexpandmight come in handy. Hope this helps!