aboutsummaryrefslogtreecommitdiff
path: root/runtime/indent/sqlanywhere.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-10-16 17:07:40 +0200
committerChristian Clason <c.clason@uni-graz.at>2021-10-16 18:03:51 +0200
commit0ba77f2f31c9de42f1e7a8435e6322d3f0a04fa5 (patch)
tree8fbc21b0e27956b2f0c5385d746edee30be198b0 /runtime/indent/sqlanywhere.vim
parent1ced6cf08c1bf819df76e3830ae12f76e987f151 (diff)
downloadrneovim-0ba77f2f31c9de42f1e7a8435e6322d3f0a04fa5.tar.gz
rneovim-0ba77f2f31c9de42f1e7a8435e6322d3f0a04fa5.tar.bz2
rneovim-0ba77f2f31c9de42f1e7a8435e6322d3f0a04fa5.zip
vim-patch:2286304cdbba
Update runtime files https://github.com/vim/vim/commit/2286304cdbba53ceb52b3ba2ba4a521b0a2f8d0f
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\)\>'