mirror of
				https://github.com/vim/vim.git
				synced 2025-10-31 09:57:14 -04:00 
			
		
		
		
	Update Fortran indent and syntax file. (Ajit Thakkar)
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| *autocmd.txt*   For Vim version 7.3b.  Last change: 2010 May 14 | *autocmd.txt*   For Vim version 7.3b.  Last change: 2010 Jul 22 | ||||||
|  |  | ||||||
|  |  | ||||||
| 		  VIM REFERENCE MANUAL    by Bram Moolenaar | 		  VIM REFERENCE MANUAL    by Bram Moolenaar | ||||||
| @@ -1280,7 +1280,7 @@ and "++ff=" argument that are effective.  These should be used for the command | |||||||
| that reads/writes the file.  The |v:cmdbang| variable is one when "!" was | that reads/writes the file.  The |v:cmdbang| variable is one when "!" was | ||||||
| used, zero otherwise. | used, zero otherwise. | ||||||
|  |  | ||||||
| See the $VIMRUNTIME/plugin/netrw.vim for examples. | See the $VIMRUNTIME/plugin/netrwPlugin.vim for examples. | ||||||
|  |  | ||||||
| ============================================================================== | ============================================================================== | ||||||
| 11. Disabling autocommands				*autocmd-disable* | 11. Disabling autocommands				*autocmd-disable* | ||||||
|   | |||||||
| @@ -1,8 +1,7 @@ | |||||||
| " Vim indent file | " Vim indent file | ||||||
| " Language:	Fortran95 (and Fortran90, Fortran77, F and elf90) | " Language:	Fortran95 (and Fortran90, Fortran77, F and elf90) | ||||||
| " Version:	0.37 | " Version:	0.38 | ||||||
| " URL:		http://www.unb.ca/chem/ajit/indent/fortran.vim | " Last Change:	2010 July 21 | ||||||
| " Last Change:	2006 Nov 16 |  | ||||||
| " Maintainer:	Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> | " Maintainer:	Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> | ||||||
| " Usage:	Do :help fortran-indent from Vim | " Usage:	Do :help fortran-indent from Vim | ||||||
|  |  | ||||||
| @@ -32,7 +31,7 @@ if !exists("b:fortran_fixed_source") | |||||||
|     " Detection becomes more accurate and time-consuming if more lines |     " Detection becomes more accurate and time-consuming if more lines | ||||||
|     " are checked. Increase the limit below if you keep lots of comments at |     " 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 = 250 |     let s:lmax = 500 | ||||||
|     if ( s:lmax > line("$") ) |     if ( s:lmax > line("$") ) | ||||||
|       let s:lmax = line("$") |       let s:lmax = line("$") | ||||||
|     endif |     endif | ||||||
| @@ -40,7 +39,7 @@ if !exists("b:fortran_fixed_source") | |||||||
|     let s:ln=1 |     let s:ln=1 | ||||||
|     while s:ln <= s:lmax |     while s:ln <= s:lmax | ||||||
|       let s:test = strpart(getline(s:ln),0,5) |       let s:test = strpart(getline(s:ln),0,5) | ||||||
|       if s:test[0] !~ '[Cc*!#]' && s:test !~ '^ \+[!#]' && s:test =~ '[^ 0-9\t]' |       if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' | ||||||
| 	let b:fortran_fixed_source = 0 | 	let b:fortran_fixed_source = 0 | ||||||
| 	break | 	break | ||||||
|       endif |       endif | ||||||
|   | |||||||
| @@ -1,7 +1,6 @@ | |||||||
| " Vim syntax file | " Vim syntax file | ||||||
| " Language:	Fortran95 (and Fortran90, Fortran77, F and elf90) | " Language:	Fortran95 (and Fortran90, Fortran77, F and elf90) | ||||||
| " Version:	0.89 | " Version:	0.89 | ||||||
| " URL:		http://www.unb.ca/chem/ajit/syntax/fortran.vim |  | ||||||
| " Last Change:	2010 July 21 | " Last Change:	2010 July 21 | ||||||
| " Maintainer:	Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> | " Maintainer:	Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> | ||||||
| " Usage:	For instructions, do :help fortran-syntax from Vim | " Usage:	For instructions, do :help fortran-syntax from Vim | ||||||
| @@ -70,25 +69,25 @@ if !exists("b:fortran_fixed_source") | |||||||
|   else |   else | ||||||
|     " f90 and f95 allow both fixed and free source form. |     " f90 and f95 allow both fixed and free source form. | ||||||
|     " Assume fixed source form unless signs of free source form |     " Assume fixed source form unless signs of free source form | ||||||
|     " are detected in the first five columns of the first b:lmax lines. |     " are detected in the first five columns of the first s:lmax lines. | ||||||
|     " Detection becomes more accurate and time-consuming if more lines |     " Detection becomes more accurate and time-consuming if more lines | ||||||
|     " are checked. Increase the limit below if you keep lots of comments at |     " 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 b:lmax = 500 |     let s:lmax = 500 | ||||||
|     if ( b:lmax > line("$") ) |     if ( s:lmax > line("$") ) | ||||||
|       let b:lmax = line("$") |       let s:lmax = line("$") | ||||||
|     endif |     endif | ||||||
|     let b:fortran_fixed_source = 1 |     let b:fortran_fixed_source = 1 | ||||||
|     let b:ln=1 |     let s:ln=1 | ||||||
|     while b:ln <= b:lmax |     while s:ln <= s:lmax | ||||||
|       let b:test = strpart(getline(b:ln),0,5) |       let s:test = strpart(getline(s:ln),0,5) | ||||||
|       if b:test !~ '^[Cc*]' && b:test !~ '^ *[!#]' && b:test =~ '[^ 0-9\t]' && b:test !~ '^[ 0-9]*\t' |       if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' | ||||||
| 	let b:fortran_fixed_source = 0 | 	let b:fortran_fixed_source = 0 | ||||||
| 	break | 	break | ||||||
|       endif |       endif | ||||||
|       let b:ln = b:ln + 1 |       let s:ln = s:ln + 1 | ||||||
|     endwhile |     endwhile | ||||||
|     unlet b:lmax b:ln b:test |     unlet! s:lmax s:ln s:test | ||||||
|   endif |   endif | ||||||
| endif | endif | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user