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.
This commit is contained in:
Frantisek Sumsal 2023-09-18 12:36:11 +02:00
parent 7b19bd60cf
commit e69056d620

2
.vimrc
View File

@ -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