Mercurial > vim
comparison runtime/indent/fortran.vim @ 1125:96cd8222a819
updated for version 7.1a
author | vimboss |
---|---|
date | Sat, 05 May 2007 18:24:42 +0000 |
parents | 2c885fab04e3 |
children | 878562053ba3 |
comparison
equal
deleted
inserted
replaced
1124:da2a955f150a | 1125:96cd8222a819 |
---|---|
1 " Vim indent file | 1 " Vim indent file |
2 " Language: Fortran95 (and Fortran90, Fortran77, F and elf90) | 2 " Language: Fortran95 (and Fortran90, Fortran77, F and elf90) |
3 " Version: 0.37 | 3 " Version: 0.37 |
4 " URL: http://www.unb.ca/chem/ajit/indent/fortran.vim | 4 " URL: http://www.unb.ca/chem/ajit/indent/fortran.vim |
5 " Last Change: 2006 Apr. 22 | 5 " Last Change: 2006 Nov 16 |
6 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> | 6 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/> |
7 " Usage: Do :help fortran-indent from Vim | 7 " Usage: Do :help fortran-indent from Vim |
8 | 8 |
9 " Only load this indent file when no other was loaded. | 9 " Only load this indent file when no other was loaded. |
10 if exists("b:did_indent") | 10 if exists("b:did_indent") |
70 let prevline=getline(a:lnum) | 70 let prevline=getline(a:lnum) |
71 " Strip tail comment | 71 " Strip tail comment |
72 let prevstat=substitute(prevline, '!.*$', '', '') | 72 let prevstat=substitute(prevline, '!.*$', '', '') |
73 | 73 |
74 "Indent do loops only if they are all guaranteed to be of do/end do type | 74 "Indent do loops only if they are all guaranteed to be of do/end do type |
75 if exists("b:fortran_do_enddo") || exists("fortran_do_enddo") | 75 if exists("b:fortran_do_enddo") || exists("g:fortran_do_enddo") |
76 if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*do\>' | 76 if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*do\>' |
77 let ind = ind + &sw | 77 let ind = ind + &sw |
78 endif | 78 endif |
79 if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*end\s*do\>' | 79 if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*end\s*do\>' |
80 let ind = ind - &sw | 80 let ind = ind - &sw |