"set your defaults for both gvim and vim (vi=vim on Linux) set tabstop=4 set shiftwidth=4 set visualbell "turns off obnoxious audible bell "set exrc "allows local .vimrc within current working directory "set ffs="" "will not switch to DOS mode, ^M will be visible "uncomment one of the following blocks: " " assume all your fortran is 'free form': let fortran_free_source=1 " you an overide the above locally by using set exrc, and putting " a single line: unlet! fortran_free_source in a local .vimrc file "or comment-out the above and uncomment this: "let s:extfname = expand("%:e") " .f90 wil be free, .f fixed "if s:extfname ==? "f90" " let fortran_free_source=1 "else " unlet! fortran_free_source "endif