syntax on filetype on filetype plugin on filetype indent on set noexpandtab set tabstop=8 set textwidth=72 set viminfo= " Don't save viminfo set modeline " Enable modelines set hlsearch " Enable hilighting of searches "set spell spelllang=en_us " spell checking " " Colors " colors eaburns highlight WhitespaceEOL ctermbg=Red guibg=Red match WhitespaceEOL /\s\+$/ " " C " let c_syntax_for_h=1 autocmd FileType c set tabstop=8 autocmd FileType c set textwidth=72 autocmd FileType c set cinkeys= autocmd FileType c set noautoindent autocmd FileType c set nocindent autocmd FileType c set noshowmatch " Initializes a new C file if !exists("*s:CNewFile") function s:CNewFile( ) 0 !echo "/**" read !echo " * \file %" read !echo " *" read !echo " *" read !echo " *" read !echo -n " * \author Ethan Burns" read !echo -n " * \date " ; date +"\%F" read !echo " */" read !echo read !echo "\#define _POSIX_C_SOURCE 200112L" read !echo read !echo "/* vi: set tabstop=8 textwidth=72: */" :0 endfunction endif augroup c autocmd! autocmd BufNewFile *.[chCH] call CNewFile() autocmd BufNewFile *.[ch]pp call CNewFile() augroup END " " python " autocmd FileType python set tabstop=4 autocmd FileType python set shiftwidth=4 autocmd FileType python set softtabstop=4 autocmd FileType python set expandtab autocmd FileType python set smarttab "autocmd FileType python set noautoindent " Initializes a new python file if !exists("*s:PythonNewFile") function s:PythonNewFile( ) 0 !echo read !echo "\# vi: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab:" :0 endfunction endif augroup python autocmd! autocmd BufNewFile *.py call PythonNewFile() augroup END " " Testor " au BufRead,BufNewFile *.t set filetype=t au FileType t set syntax=t " " TLA " au BufRead,BufNewFile *.tla set filetype=tla au FileType tla set syntax=tla " " OCAML " autocmd FileType ocaml set tabstop=2 autocmd FileType ocaml set shiftwidth=2 autocmd FileType ocaml set softtabstop=2 autocmd FileType ocaml set expandtab " LaTeX autocmd FileType tex setlocal spell spelllang=en_us " Text files autocmd FileType txt setlocal spell spelllang=en_us