GIF89a; EcchiShell v1.0
//proc/self/root/usr/share/vim/ line("$") ) let s:lmax = line("$") endif let b:fortran_fixed_source = 1 let s:ln=1 while s:ln <= s:lmax let s:test = strpart(getline(s:ln),0,5) if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' let b:fortran_fixed_source = 0 break endif let s:ln = s:ln + 1 endwhile unlet! s:lmax s:ln s:test endif endif " Set comments and textwidth according to source type if (b:fortran_fixed_source == 1) setlocal comments=:!,:*,:C " Fixed format requires a textwidth of 72 for code setlocal tw=72 " If you need to add "&" on continued lines so that the code is " compatible with both free and fixed format, then you should do so " in column 73 and uncomment the next line " setlocal tw=73 else setlocal comments=:! " Free format allows a textwidth of 132 for code but 80 is more usual setlocal tw=80 endif " Set commentstring for foldmethod=marker setlocal cms=!%s " Tabs are not a good idea in Fortran so the default is to expand tabs if !exists("fortran_have_tabs") setlocal expandtab endif " Set 'formatoptions' to break comment and text lines but allow long lines setlocal fo+=tcql setlocal include=^\\c#\\=\\s*include\\s\\+ setlocal suffixesadd+=.f08,.f03,.f95,.f90,.for,.f,.F,.f77,.ftn,.fpp " Define patterns for the matchit plugin if !exists("b:match_words") let s:notend = '\%(\:' . s:notselect. '\:\,' . \ s:notelse . '\:' . \ '\:\,'. \ 'do\s\+\(\d\+\):\%(^\s*\)\@<=\1\s,'. \ s:notend . '\:\,'. \ s:notelse . '\:\:\,'. \ s:notend . '\,'. \ s:notend . '\:\,'. \ s:notend . '\:\,'. \ s:notend . '\:\,'. \ s:notend . '\:\,'. \ s:notend . '\:\,'. \ s:notend . '\:\,'. \ s:notend . '\' . s:notprocedure . ':\,'. \ s:notend . '\:\' endif " File filters for :browse e if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . \ "All Files (*.*)\t*.*\n" endif let b:undo_ftplugin = "setl fo< com< tw< cms< et< inc<" \ . "| unlet! b:match_ignorecase b:match_words b:browsefilter" let &cpoptions=s:cposet unlet s:cposet " vim:sw=2