summaryrefslogtreecommitdiff
path: root/runtime/indent
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-22 22:33:57 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-22 22:33:57 +0000
commiteb3593b38b7b6b658e93ad05d6caf76d58cc0c35 (patch)
tree39210f19a86e4db2914523b0fde4a5ff9d345c16 /runtime/indent
parent57657d85c6c3d812e99b5e5d5161c07c66ac7dc7 (diff)
downloadvim-git-eb3593b38b7b6b658e93ad05d6caf76d58cc0c35.tar.gz
updated for version 7.0e06v7.0e06
Diffstat (limited to 'runtime/indent')
-rw-r--r--runtime/indent/fortran.vim16
-rw-r--r--runtime/indent/python.vim2
2 files changed, 12 insertions, 6 deletions
diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim
index 465412b16..94b9da177 100644
--- a/runtime/indent/fortran.vim
+++ b/runtime/indent/fortran.vim
@@ -1,8 +1,8 @@
" Vim indent file
" Language: Fortran95 (and Fortran90, Fortran77, F and elf90)
-" Version: 0.36
+" Version: 0.37
" URL: http://www.unb.ca/chem/ajit/indent/fortran.vim
-" Last Change: 2006 Apr. 02
+" Last Change: 2006 Apr. 22
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www.unb.ca/chem/ajit/>
" Usage: Do :help fortran-indent from Vim
@@ -14,6 +14,7 @@ let b:did_indent = 1
setlocal indentkeys+==~end,=~case,=~if,=~else,=~do,=~where,=~elsewhere,=~select
setlocal indentkeys+==~endif,=~enddo,=~endwhere,=~endselect
+setlocal indentkeys+==~type,=~interface
" Determine whether this is a fixed or free format source file
" if this hasn't been done yet
@@ -81,20 +82,25 @@ function FortranGetIndent(lnum)
endif
"Add a shiftwidth to statements following if, else, case,
- "where and elsewhere statements
+ "where, elsewhere, type and interface statements
if prevstat =~? '^\s*\(\d\+\s\)\=\s*\(else\|case\|where\|elsewhere\)\>'
+ \ ||prevstat =~? '^\s*\(\d\+\s\)\=\s*\(type\|interface\)\>'
\ || prevstat =~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>'
let ind = ind + &sw
" Remove unwanted indent after logical and arithmetic ifs
if prevstat =~? '\<if\>' && prevstat !~? '\<then\>'
let ind = ind - &sw
endif
+ " Remove unwanted indent after type( statements
+ if prevstat =~? '\<type\s*('
+ let ind = ind - &sw
+ endif
endif
"Subtract a shiftwidth from else, elsewhere, case, end if,
- " end where and end select statements
+ " end where, end select, end interface and end type statements
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
- \. '\(else\|elsewhere\|case\|end\s*\(if\|where\|select\)\)\>'
+ \. '\(else\|elsewhere\|case\|end\s*\(if\|where\|select\|interface\|type\)\)\>'
let ind = ind - &sw
" Fix indent for case statement immediately after select
if prevstat =~? '\<select\>'
diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim
index 4b8e81bac..cda6ec741 100644
--- a/runtime/indent/python.vim
+++ b/runtime/indent/python.vim
@@ -2,7 +2,7 @@
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
-" Last Change: 2006 Apr 21
+" Last Change: 2006 Apr 22
" Only load this indent file when no other was loaded.
if exists("b:did_indent")