From 886de5d4ab8444d6216241b2ddb9f23f8b025323 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Fri, 22 Jan 2016 13:42:10 +1000 Subject: [PATCH] Added comments for each section --- .vimrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.vimrc b/.vimrc index 6bfb311..f8e08e1 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,4 @@ +" Preferred global default settings: set number set background=dark set smartindent @@ -7,7 +8,8 @@ set expandtab set spell spelllang=en_au syntax enable match ErrorMsg '\s\+$' -" Removes trailing spaces + +" Removes trailing spaces: function! TrimWhiteSpace() %s/\s\+$//e endfunction @@ -18,8 +20,10 @@ autocmd FileAppendPre * :call TrimWhiteSpace() autocmd FilterWritePre * :call TrimWhiteSpace() autocmd BufWritePre * :call TrimWhiteSpace() +" Add files ending in md to the list of files recognised as markdown: autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown +" Settings for my Haskell environment: function! HaskellSettings() set tabstop=8 set shiftwidth=8 @@ -27,6 +31,7 @@ function! HaskellSettings() endfunction autocmd BufNewFile,BufFilePre,BufRead *.hs :call HaskellSettings() +" Settings for my Golang environment: function! GoSettings() set tabstop=7 set shiftwidth=7 @@ -34,6 +39,7 @@ function! GoSettings() endfunction autocmd BufNewFile,BufFilePre,BufRead *.go :call GoSettings() +" Settings for my Python environment: function! PythonSettings() set tabstop=4 set shiftwidth=4