diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-04 13:56:28 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-04 13:56:28 -0400 |
| commit | e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b (patch) | |
| tree | e45f71a17c410e456c56de52f94f5c7f95152ad7 /runtime/ftplugin/fortran.vim | |
| parent | 490804ed33a5da70ba14bc54bceea5decb62874a (diff) | |
| parent | 6a32852137a3d54131534fe628230eca5311d3fc (diff) | |
| download | rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.tar.gz rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.tar.bz2 rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.zip | |
Merge pull request #4704 from KillTheMule/vim-runtime-patches-all
vim-patch:{a0f849e, d7464be, b4ff518, e392eb4, d042dc8, 2c5e8e8, 256972a, cc7ff3f}
Diffstat (limited to 'runtime/ftplugin/fortran.vim')
| -rw-r--r-- | runtime/ftplugin/fortran.vim | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index 7591edd821..5d42409fd4 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -1,9 +1,9 @@ " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) -" Version: 0.49 -" Last Change: 2013 Oct. 01 +" Version: 0.50 +" Last Change: 2015 Nov. 30 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> -" Usage: Do :help fortran-plugin from Vim +" Usage: For instructions, do :help fortran-plugin from Vim " Credits: " Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben " Fritz, and David Barnett. @@ -20,7 +20,10 @@ set cpoptions&vim let b:did_ftplugin = 1 " Determine whether this is a fixed or free format source file -" if this hasn't been done yet +" if this hasn't been done yet using the priority: +" buffer-local value +" > global value +" > file extension as in Intel ifort, gcc (gfortran), NAG, Pathscale, and Cray compilers if !exists("b:fortran_fixed_source") if exists("fortran_free_source") " User guarantees free source form @@ -28,13 +31,19 @@ if !exists("b:fortran_fixed_source") elseif exists("fortran_fixed_source") " User guarantees fixed source form let b:fortran_fixed_source = 1 + elseif expand("%:e") ==? "f\<90\|95\|03\|08\>" + " Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers + let b:fortran_fixed_source = 0 + elseif expand("%:e") ==? "f\|f77\|for" + " Fixed-form file extension defaults + let b:fortran_fixed_source = 1 else - " Modern Fortran allows both fixed and free source form - " assume fixed source form unless signs of free source form - " are detected in the first five columns of the first s:lmax lines + " Modern fortran still allows both fixed and free source form + " Assume fixed source form unless signs of free source form + " are detected in the first five columns of the first s:lmax lines. " Detection becomes more accurate and time-consuming if more lines " are checked. Increase the limit below if you keep lots of comments at - " the very top of each file and you have a fast computer + " the very top of each file and you have a fast computer. let s:lmax = 500 if ( s:lmax > line("$") ) let s:lmax = line("$") |