/ src / .vimrc
.vimrc
 1  "
 2  " This file is intended to make 'vim' better match the style of emc2 source
 3  " files, and also to enable features like full-text searching of the source
 4  " tree.  You can use it by setting 'exrc' in your ~/.vimrc (but see the
 5  " security warning at :help 'exrc before you do so) or by copying these lines
 6  " into your ~/.vimrc (but then they will affect all files you edit with vim)
 7  "
 8  
 9  augroup filetypedetect
10   au! BufRead,BufNewFile *.comp setfiletype c
11  augroup END
12  
13  augroup emc2
14   " Remove all prior emc2 autocommands
15   au!
16   autocmd FileType *     set formatoptions=tcql nocindent sts=4 et sw=4 comments&
17   autocmd FileType c,cpp set formatoptions=croql cindent sts=4 noet sw=4  comments=sr:/*,mb:*,el:/*,://
18   autocmd FileType py    set formatoptions=croql nocindent sts=4 et sw=4 comments=b:#
19  augroup END
20  
21  " This assumes the working directory is emc2/src which is also required for
22  " :make and :tag to work
23  set grepprg=../scripts/swish
24