aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/c.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/indent/c.vim')
-rw-r--r--vim/after/indent/c.vim14
1 files changed, 10 insertions, 4 deletions
diff --git a/vim/after/indent/c.vim b/vim/after/indent/c.vim
index ad01aceb..9cea0a2d 100644
--- a/vim/after/indent/c.vim
+++ b/vim/after/indent/c.vim
@@ -1,9 +1,15 @@
-" Use hard tabs for C
+" Use plain old tabs for indent in C files
setlocal noexpandtab
-setlocal shiftwidth=0
-let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
+let b:undo_indent .= '|setlocal expandtab<'
+if v:version > 703
+ \ || v:version == 703 && has('patch629')
+ setlocal shiftwidth=0
+else
+ let &l:shiftwidth = &l:tabstop
+endif
+let b:undo_indent .= '|setlocal shiftwidth<'
if &softtabstop != -1
- let &softtabstop = &shiftwidth
+ let &l:softtabstop = &l:shiftwidth
let b:undo_indent .= '|setlocal softtabstop<'
endif