From: Frantisek Sumsal Date: Mon, 18 Sep 2023 10:36:11 +0000 (+0200) Subject: vimrc: explicitly set shiftwidth for the C file type X-Git-Tag: v255-rc1~511^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F29206%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/.vimrc b/.vimrc index 9a512ec6c8c..70d063d9caa 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