diff --git a/vimrc b/vimrc index 0040567..76c612f 100644 --- a/vimrc +++ b/vimrc @@ -206,9 +206,15 @@ if has('autocmd') \ exe "normal! g`\"" | \ endif - " Clean whitespace before saving: Python, C, HTML, and Objective-C - autocmd BufWritePre *.py,*.h,*.c,*.html,*.m + " Clean whitespace before saving code files. + autocmd BufWritePre *.py,*.h,*.c,*.html,*.m,*.cc,*.hh,*.mm \ :call StripTrailingWhitespace() + + " Reload snippets after editing the snippets file. Snippet files are + " .snippets. Get from the filename and reload the + " snippets for that type. + autocmd BufWritePost *.snippets + \ :call ReloadSnippets(expand('%:t:r')) endif if has('unix')