Enclose custom auto commands in groups

This commit is contained in:
Andrew Miner
2026-09-21 14:56:31 -06:00
parent becdb1c1bc
commit aaaa4d072a
+6
View File
@@ -308,15 +308,21 @@ silent! source .vimrc.local " project specific .vimrc
" File-Type Specific Settings ###################################################################### " File-Type Specific Settings ######################################################################
augroup file-specific
autocmd!
autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70 autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70
autocmd BufRead Makefile setlocal noexpandtab autocmd BufRead Makefile setlocal noexpandtab
autocmd BufRead *.scss setlocal shiftwidth=4 autocmd BufRead *.scss setlocal shiftwidth=4
autocmd BufNewFile,BufRead *.md Wrapwidth 100 | setlocal textwidth=0 spell wrap autocmd BufNewFile,BufRead *.md Wrapwidth 100 | setlocal textwidth=0 spell wrap
autocmd WinResized *.md Wrapwidth 100 autocmd WinResized *.md Wrapwidth 100
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
augroup END
" Startup Commands ################################################################################# " Startup Commands #################################################################################
augroup startup
autocmd!
autocmd VimEnter * if argc() == 0 | NERDTree | wincmd p | vertical resize 111 autocmd VimEnter * if argc() == 0 | NERDTree | wincmd p | vertical resize 111
autocmd CursorHold,FocusLost * silent! wall autocmd CursorHold,FocusLost * silent! wall
autocmd FileType qf execute "resize " . float2nr(&lines * 1 / 3) autocmd FileType qf execute "resize " . float2nr(&lines * 1 / 3)
augroup END