Update runtime files

This commit is contained in:
Bram Moolenaar
2021-10-16 15:23:36 +01:00
parent 28b6a3bef6
commit 2286304cdb
26 changed files with 412 additions and 239 deletions

View File

@ -1,8 +1,14 @@
" Vim indent file
" Language: Hamster Script
" Version: 2.0.6.0
" Last Change: Wed Nov 08 2006 12:02:42 PM
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 2.0.6.1
" Last Change: 2021 Oct 11
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Download: https://www.vim.org/scripts/script.php?script_id=1099
"
" 2.0.6.1 (Oct 2021)
" Added b:undo_indent
" Added cpo check
"
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -14,12 +20,17 @@ setlocal indentkeys+==~if,=~else,=~endif,=~endfor,=~endwhile
setlocal indentkeys+==~do,=~until,=~while,=~repeat,=~for,=~loop
setlocal indentkeys+==~sub,=~endsub
let b:undo_indent = "setl indentkeys<"
" Define the appropriate indent function but only once
setlocal indentexpr=HamGetFreeIndent()
if exists("*HamGetFreeIndent")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
function HamGetIndent(lnum)
let ind = indent(a:lnum)
let prevline=getline(a:lnum)
@ -52,4 +63,8 @@ function HamGetFreeIndent()
return ind
endfunction
" Restore:
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2 tw=80

View File

@ -1,9 +1,8 @@
" Vim indent file
" Language: SQL
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change By Maintainer: 2017 Jun 13
" Last Change: by Stephen Wall, #5578, 2020 Jun 07
" Version: 3.0
" Last Change: 2021 Oct 11
" Version: 4.0
" Download: http://vim.sourceforge.net/script.php?script_id=495
" Notes:
@ -21,6 +20,9 @@
" it, this can leave the indent hanging to the right one too many.
"
" History:
" 4.0 (Oct 2021)
" Added b:undo_indent
"
" 3.0 (Dec 2012)
" Added cpo check
"
@ -56,10 +58,13 @@ setlocal indentkeys+==~end,=~else,=~elseif,=~elsif,0=~when,0=)
" in the indentkeys is typed
setlocal indentexpr=GetSQLIndent()
let b:undo_indent = "setl indentexpr< indentkeys<"
" Only define the functions once.
if exists("*GetSQLIndent")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
@ -68,14 +73,9 @@ set cpo&vim
" IS is excluded, since it is difficult to determine when the
" ending block is (especially for procedures/functions).
let s:SQLBlockStart = '^\s*\%('.
\ 'if\>.*\<then\|'.
\ 'then\|else\>\|'.
\ 'elseif\>.*\<then\|'.
\ 'elsif\>.(\<then\|'.
\ 'while\>.*\<loop\|'.
\ 'for\>.*\<loop\|'.
\ 'foreach\>.*\<loop\|'.
\ 'loop\|do\|declare\|begin\|'.
\ 'if\|else\|elseif\|elsif\|'.
\ 'while\|loop\|do\|for\|'.
\ 'begin\|'.
\ 'case\|when\|merge\|exception'.
\ '\)\>'
let s:SQLBlockEnd = '^\s*\(end\)\>'

View File

@ -1,7 +1,8 @@
" Vim indent file
" Language: C-shell (tcsh)
" Maintainer: Doug Kearns <a@b.com> where a=dougkearns, b=gmail
" Last Modified: Sun 26 Sep 2021 12:38:38 PM EDT
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Gautam Iyer <gi1242+vim@NoSpam.com> where NoSpam=gmail (Original Author)
" Last Change: 2021 Oct 15
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -11,7 +12,9 @@ endif
let b:did_indent = 1
setlocal indentexpr=TcshGetIndent()
setlocal indentkeys+=e,0=end,0=endsw indentkeys-=0{,0},0),:,0#
setlocal indentkeys+=e,0=end
setlocal indentkeys-=0{,0},0),:,0#
let b:undo_indent = "setl inde< indk<"
" Only define the function once.
@ -40,9 +43,9 @@ function TcshGetIndent()
let ind = ind - shiftwidth()
endif
" Subtract indent if current line has on end, endif, case commands
" Subtract indent if current line has on end, endif, endsw, case commands
let line = getline(v:lnum)
if line =~ '\v^\s*%(else|end|endif)\s*$'
if line =~ '\v^\s*%(else|end|endif|endsw)\s*$'
let ind = ind - shiftwidth()
endif