updated for version 7.0e05

This commit is contained in:
Bram Moolenaar
2006-04-21 22:12:41 +00:00
parent fc1421eb53
commit 57657d85c6
201 changed files with 3115 additions and 2797 deletions

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: automake
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -56,7 +56,7 @@ fun! CMakeGetIndent(lnum)
\ or . '[^()\\#"]' . or . '\\.' . '\)*'
let cmake_indent_comment_line = '^\s*' . cmake_regex_comment
let cmake_indent_blank_regex = '^\s*$')
let cmake_indent_blank_regex = '^\s*$'
let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier .
\ '\s*(' . cmake_regex_arguments .
\ '\(' . cmake_regex_comment . '\)\?$'
@ -65,8 +65,8 @@ fun! CMakeGetIndent(lnum)
\ ')\s*' .
\ '\(' . cmake_regex_comment . '\)\?$'
let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\)\s*('
let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\)\s*('
let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|WHILE\)\s*('
let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ENDWHILE\)\s*('
" Add
if previous_line =~? cmake_indent_comment_line " Handle comments

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Autoconf configure.{ac,in} file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2006-02-11
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" TODO: how about nested [()]'s in one line
" what's wrong with '\\\@!'?

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-30
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: dict(1) configuration file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-30
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: dictd(8) configuration file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-07-01
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: DocBook Documentation Format
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Eterm configuration file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: ld(1) script
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-30
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Makefile
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish
@ -15,18 +15,9 @@ if exists("*GetMakeIndent")
finish
endif
function s:GetStringWidth(line, str)
let end = matchend(a:line, a:str)
let width = 0
for c in a:line
if c == "\t"
let width += &ts - (width % &ts)
else
let width += 1
endif
endfor
return width
endfunction
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
let s:continuation_rx = '\\$'
let s:assignment_rx = '^\s*\h\w*\s*+\==\s*\zs.*\\$'
function GetMakeIndent()
let lnum = v:lnum - 1
@ -35,11 +26,27 @@ function GetMakeIndent()
endif
let line = getline(lnum)
if line == ''
return 0
elseif line =~ '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
return indent(lnum) + &ts
elseif line =~ '^\s*\h\w*\s*+\==\s*.\+\\$'
return s:GetStringWidth(line, '+\==\s*')
let ind = indent(lnum)
if line =~ s:rule_rx
return ind + &ts
elseif line =~ s:continuation_rx
while lnum > 0 && line =~ s:continuation_rx && line !~ s:assignment_rx
let lnum -= 1
let line = getline(lnum)
endwhile
if line =~ s:assignment_rx
call cursor(lnum, 1)
return search(s:assignment_rx, 'W') != 0 ? virtcol('.') - 1 : 0
else
return 0
endif
else
let pnum = lnum - 1
if pnum == 0
return ind
endif
return getline(pnum) =~ s:continuation_rx ? 0 : ind
endif
endfunction

View File

@ -2,7 +2,7 @@
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
" Last Change: 2006 Mar 26
" Last Change: 2006 Apr 21
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: readline configuration file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: reStructuredText Documentation Format
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Shell Script
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -130,14 +130,16 @@ function! GetSMLIndent()
elseif line =~ '^\s*else\>'
if lline !~ '^\s*\(if\|else\|then\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
else return ind
else
return ind
endif
" Match 'then' with 'if'
elseif line =~ '^\s*then\>'
if lline !~ '^\s*\(if\|else\|then\)\>'
return s:FindPair('\<if\>', '', '\<then\>')
else return ind
else
return ind
endif
" Indent if current line begins with ']'

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Tcl
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-30
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: XFree86 Configuration File
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: xinetd.conf(5) configuration file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-28
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: YACC input file
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Zsh Shell Script
" Maintainer: Nikolai Weibull <nikolai+work.vim@bitwi.se>
" Latest Revision: 2005-06-29
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
if exists("b:did_indent")
finish