Hacker News new | ask | show | jobs
by alisonatwork 1456 days ago
You can change it per filetype. For example, I have a similarly minimal vimrc that defaults to sw=4, ts=4 and expandtab, but with the following additions:

  autocmd FileType go,make,sh set noexpandtab
  autocmd FileType js,json set sw=2 ts=2
Edit: I think you might also need the following to make it trigger the FileType event when you open a file in the first place:

  filetype plugin indent on