aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/c.vim
blob: ad01aceb6ad83208b470d1e12f56e0246b2c2e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
" Use hard tabs for C
setlocal noexpandtab
setlocal shiftwidth=0
let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
if &softtabstop != -1
  let &softtabstop = &shiftwidth
  let b:undo_indent .= '|setlocal softtabstop<'
endif

" If the path to the file looks like the Vim sources, set 'shiftwidth' to 4
if expand('%:p') =~# '/vim.*src/'
  setlocal shiftwidth=4
endif