Enclose custom auto commands in groups
This commit is contained in:
+15
-9
@@ -308,15 +308,21 @@ silent! source .vimrc.local " project specific .vimrc
|
||||
|
||||
" File-Type Specific Settings ######################################################################
|
||||
|
||||
autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70
|
||||
autocmd BufRead Makefile setlocal noexpandtab
|
||||
autocmd BufRead *.scss setlocal shiftwidth=4
|
||||
autocmd BufNewFile,BufRead *.md Wrapwidth 100 | setlocal textwidth=0 spell wrap
|
||||
autocmd WinResized *.md Wrapwidth 100
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
augroup file-specific
|
||||
autocmd!
|
||||
autocmd BufRead COMMIT_EDITMSG set textwidth=70 colorcolumn=70
|
||||
autocmd BufRead Makefile setlocal noexpandtab
|
||||
autocmd BufRead *.scss setlocal shiftwidth=4
|
||||
autocmd BufNewFile,BufRead *.md Wrapwidth 100 | setlocal textwidth=0 spell wrap
|
||||
autocmd WinResized *.md Wrapwidth 100
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
augroup END
|
||||
|
||||
" Startup Commands #################################################################################
|
||||
|
||||
autocmd VimEnter * if argc() == 0 | NERDTree | wincmd p | vertical resize 111
|
||||
autocmd CursorHold,FocusLost * silent! wall
|
||||
autocmd FileType qf execute "resize " . float2nr(&lines * 1 / 3)
|
||||
augroup startup
|
||||
autocmd!
|
||||
autocmd VimEnter * if argc() == 0 | NERDTree | wincmd p | vertical resize 111
|
||||
autocmd CursorHold,FocusLost * silent! wall
|
||||
autocmd FileType qf execute "resize " . float2nr(&lines * 1 / 3)
|
||||
augroup END
|
||||
|
||||
Reference in New Issue
Block a user