xref: /vim-8.2.3635/runtime/ftplugin/sql.vim (revision 071d4279)
1" Vim filetype plugin file
2" Language:	SQL (Common for Oracle, Microsoft SQL Server, Sybase)
3" Version:	0.02
4" Maintainer:	David Fishburn <[email protected]>
5" Last Change:	Tue May 27 2003 09:33:31
6
7" This file should only contain values that are common to all SQL languages
8" Oracle, Microsoft SQL Server, Sybase ASA/ASE, MySQL, and so on
9" If additional features are required create:
10" vimfiles/after/ftplugin/sql.vim
11" to override and add any of your own settings
12
13" Only do this when not done yet for this buffer
14if exists("b:did_ftplugin")
15  finish
16endif
17
18" Don't load another plugin for this buffer
19let b:did_ftplugin = 1
20
21" Define patterns for the matchit macro
22if !exists("b:match_words")
23    " SQL is generally case insensitive
24    let b:match_ignorecase = 1
25    let b:match_words =
26		\ '\<begin\>:\<end\>\(;\)\?$,'.
27		\ '\<if\>:\<elsif\>:\<elseif\>:\<else\>:'.
28		\ '\%(\<end\s\+\)\@<!' . '\<if\>:\<end\s\+if\>,'.
29		\ '\<loop\>:\<break\>:\<continue\>:'.
30		\ '\%(\<end\s\+\)\@<!' . '\<loop\>:\<end\s\+loop\>,'.
31		\ '\<for\>:\<break\>:\<continue\>:'.
32		\ '\%(\<end\s\+\)\@<!' . '\<for\>:\<end\s\+for\>,'.
33		\ '\<case\>:\<when\>:\<default\>:'.
34		\ '\%(\<end\s\+\)\@<!' . '\<case\>:\<end\s\+case\>'
35endif
36