aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/vim.vim
blob: 7e36c4cc42a8470907b2d9a1c9ab822a321c32eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
" Observe VimL conventions for two-space indents
setlocal shiftwidth=2
if v:version > 703 || v:version == 703 && has('patch693')
  setlocal softtabstop=-1
else
  setlocal softtabstop=2
endif

" Remove inapplicable defaults from 'indentkeys'
setlocal indentkeys-=0#
setlocal indentkeys-=0{
setlocal indentkeys-=0}
setlocal indentkeys-=0)
setlocal indentkeys-=:

" Commands to undo the above
if exists('b:undo_indent')
  let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<'
  let b:undo_indent = b:undo_indent . '|setlocal softtabstop<'
endif