aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:25:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:25:36 +1200
commit628ad57d7f514896f1b1a9dd77085e0d713602d5 (patch)
treed0eafe9d6f1b5cf5cf674c5905b98873f57b3383
parentAdd abbreviation to TextAnywhere Vim ftplugin (diff)
downloaddotfiles-628ad57d7f514896f1b1a9dd77085e0d713602d5.tar.gz
dotfiles-628ad57d7f514896f1b1a9dd77085e0d713602d5.zip
Switch to tab indents for writing C
-rw-r--r--vim/after/indent/c.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/after/indent/c.vim b/vim/after/indent/c.vim
new file mode 100644
index 00000000..c3240acb
--- /dev/null
+++ b/vim/after/indent/c.vim
@@ -0,0 +1,6 @@
+" Use tabs for C
+setlocal noexpandtab shiftwidth=0 tabstop=8
+if &softtabstop != -1
+ let &softtabstop = &shiftwidth
+endif
+let b:undo_ftplugin .= '|setlocal expandtab< shiftwidth< softtabstop< tabstop<'