annotate runtime/syntax/sql.vim @ 284:e697bd3c3876 v7.0075

updated for version 7.0075
author vimboss
date Sun, 22 May 2005 22:12:58 +0000
parents a81bc802c17c
children 66263e241ce3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: SQL, PL/SQL (Oracle 8i)
19
a81bc802c17c updated for version 7.0011
vimboss
parents: 7
diff changeset
3 " Maintainer: Paul Moore <pf_moore AT yahoo.co.uk>
a81bc802c17c updated for version 7.0011
vimboss
parents: 7
diff changeset
4 " Last Change: 2004 Jul 19
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " The SQL reserved words, defined as keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword sqlSpecial false null true
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword sqlKeyword access add as asc begin by check cluster column
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword sqlKeyword compress connect current cursor decimal default desc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword sqlKeyword else elsif end exception exclusive file for from
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword sqlKeyword function group having identified if immediate increment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword sqlKeyword index initial into is level loop maxextents mode modify
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword sqlKeyword nocompress nowait of offline on online start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword sqlKeyword successful synonym table then to trigger uid
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword sqlKeyword unique user validate values view whenever
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword sqlKeyword where with option order pctfree privileges procedure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword sqlKeyword public resource return row rowlabel rownum rows
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword sqlKeyword session share size smallint type using
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword sqlOperator not and or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword sqlOperator in any some all between exists
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword sqlOperator like escape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword sqlOperator union intersect minus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword sqlOperator prior distinct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword sqlOperator sysdate out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword sqlStatement alter analyze audit comment commit create
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword sqlStatement delete drop execute explain grant insert lock noaudit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword sqlStatement rename revoke rollback savepoint select set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword sqlStatement truncate update
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword sqlType boolean char character date float integer long
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Strings and characters:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Numbers:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Comments:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn region sqlComment start="/\*" end="\*/" contains=sqlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match sqlComment "--.*$" contains=sqlTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn sync ccomment sqlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Todo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 if version >= 508 || !exists("did_sql_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 let did_sql_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink sqlComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink sqlKeyword sqlSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink sqlNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink sqlOperator sqlStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink sqlSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink sqlStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink sqlString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink sqlType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink sqlTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 let b:current_syntax = "sql"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " vim: ts=8