summaryrefslogtreecommitdiffstats
path: root/.vimrc
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2023-09-18 12:36:11 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2023-09-18 13:11:45 +0200
commite69056d6202c23d529e43c0f4d7230274de8fd14 (patch)
tree66fecd06d41edff53672720da942c0fb7af466b6 /.vimrc
parentcore: limit the LSan shenanigans to PID 1 (diff)
downloadsystemd-e69056d6202c23d529e43c0f4d7230274de8fd14.tar.xz
systemd-e69056d6202c23d529e43c0f4d7230274de8fd14.zip
vimrc: explicitly set shiftwidth for the C file type
If you start editing a shell script and then open a buffer with a C file, the shiftwidth set by the previous autocommand for the sh file type would not be reset to the original (global) 8ch. Let's fix this by explicitly setting the shiftwidth in the C file type autocommand as well.
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/.vimrc b/.vimrc
index 9a512ec6c8..70d063d9ca 100644
--- a/.vimrc
+++ b/.vimrc
@@ -18,4 +18,4 @@ set makeprg=GCC_COLORS=\ make
set tw=79
au BufRead,BufNewFile *.xml set tw=109 shiftwidth=2 smarttab
au FileType sh set tw=109 shiftwidth=4 smarttab
-au FileType c set tw=109
+au FileType c set tw=109 shiftwidth=8