From 8629434e195d53284050ea9bbd3f35be4a6722f6 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Thu, 27 Oct 2016 19:39:51 +1000 Subject: [PATCH] Added C environment --- .vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vimrc b/.vimrc index dee7170..b3b146c 100644 --- a/.vimrc +++ b/.vimrc @@ -69,6 +69,7 @@ function! ReStructuredSettings() set spell spelllang=en_au endfunction autocmd BufNewFile,BufFilePre,BufRead *.rst :call ReStructuredSettings() +autocmd BufNewFile,BufFilePre,BufRead *.txt :call ReStructuredSettings() " My LaTeX environment: function! LaTeXSettings() @@ -114,3 +115,12 @@ function! MuttSettings() endfunction autocmd BufNewFile,BufFilePre,BufRead mutt-* :call MarkdownSettings() +" Settings for my C environment: +function! CSettings() + set tabstop=2 + set shiftwidth=2 + set expandtab + set textwidth=79 +endfunction +autocmd BufNewFile,BufFilePre,BufRead *.c :call CSettings() +