aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/sqlanywhere.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-10-16 19:24:19 +0200
committerGitHub <noreply@github.com>2021-10-16 19:24:19 +0200
commitfc1cdb88218c7db5ce2641c9eaf7a4a8a3dba32c (patch)
treee8e7bb3f482fd5015920466d639f6313f2c18e85 /runtime/indent/sqlanywhere.vim
parent1ced6cf08c1bf819df76e3830ae12f76e987f151 (diff)
parentfbc5b7b090221eb5344dd0d09b13f24fdedf2630 (diff)
downloadrneovim-fc1cdb88218c7db5ce2641c9eaf7a4a8a3dba32c.tar.gz
rneovim-fc1cdb88218c7db5ce2641c9eaf7a4a8a3dba32c.tar.bz2
rneovim-fc1cdb88218c7db5ce2641c9eaf7a4a8a3dba32c.zip
Merge pull request #16042 from clason/vim-2286304cdbba
vim-patch:2286304cdbba chore(test): adapt healthcheck test to new css syntax
Diffstat (limited to 'runtime/indent/sqlanywhere.vim')
-rw-r--r--runtime/indent/sqlanywhere.vim22
1 files changed, 11 insertions, 11 deletions
diff --git a/runtime/indent/sqlanywhere.vim b/runtime/indent/sqlanywhere.vim
index d39fa3240e..4772b5951b 100644
--- a/runtime/indent/sqlanywhere.vim
+++ b/runtime/indent/sqlanywhere.vim
@@ -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\)\>'