7
|
1 " Vim filetype plugin file
|
|
2 " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase)
|
|
3 " Version: 0.02
|
|
4 " Maintainer: David Fishburn <fishburn@ianywhere.com>
|
|
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
|
|
14 if exists("b:did_ftplugin")
|
|
15 finish
|
|
16 endif
|
|
17
|
|
18 " Don't load another plugin for this buffer
|
|
19 let b:did_ftplugin = 1
|
|
20
|
|
21 " Define patterns for the matchit macro
|
|
22 if !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\>'
|
|
35 endif
|