annotate runtime/syntax/mysql.vim @ 25728:7865a20c6ed3

Added tag v8.2.3399 for changeset 71d3ebfb00b68bfedfc95184e3ab3de32d611f47
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 Sep 2021 19:30:05 +0200
parents 46763b01cd9a
children 31b224083517
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: mysql
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Kenneth J. Pronovici <pronovic@ieee.org>
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
4 " Last Change: $LastChangedDate: 2016-04-11 10:31:04 -0500 (Mon, 11 Apr 2016) $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.mysql
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
6 " URL: ftp://cedar-solutions.com/software/mysql.vim
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
7 " Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 8876
diff changeset
9 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 8876
diff changeset
10 if exists("b:current_syntax")
7
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 " Always ignore case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " General keywords which don't fall into other categories
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
18 syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg_row_length
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
19 syn keyword mysqlKeyword both by
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
20 syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
21 syn keyword mysqlKeyword current_date current_time current_timestamp
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
22 syn keyword mysqlKeyword data database databases day day_hour day_minute day_second
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
23 syn keyword mysqlKeyword default delayed delay_key_write delete desc describe distinct distinctrow drop
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
24 syn keyword mysqlKeyword enclosed escape escaped explain
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
25 syn keyword mysqlKeyword fields file first flush for foreign from full function
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
26 syn keyword mysqlKeyword global grant grants group
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
27 syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
28 syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
29 syn keyword mysqlKeyword join
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
30 syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
31 syn keyword mysqlKeyword low_priority
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
32 syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
33 syn keyword mysqlKeyword natural no
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
34 syn keyword mysqlKeyword on optimize option optionally order outer outfile
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
35 syn keyword mysqlKeyword pack_keys partial password primary privileges procedure process processlist
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
36 syn keyword mysqlKeyword read references reload rename replace restrict returns revoke right row rows
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
37 syn keyword mysqlKeyword second select show shutdown soname sql_big_result sql_big_selects sql_big_tables sql_log_off
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
38 syn keyword mysqlKeyword sql_log_update sql_low_priority_updates sql_select_limit sql_small_result sql_warnings starting
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
39 syn keyword mysqlKeyword status straight_join string
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
40 syn keyword mysqlKeyword table tables temporary terminated to trailing type
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
41 syn keyword mysqlKeyword unique unlock unsigned update usage use using
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
42 syn keyword mysqlKeyword values varbinary variables varying
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
43 syn keyword mysqlKeyword where with write
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
44 syn keyword mysqlKeyword year_month
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
45 syn keyword mysqlKeyword zerofill
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Special values
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
48 syn keyword mysqlSpecial false null true
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Strings (single- and double-quote)
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
51 syn region mysqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
52 syn region mysqlString start=+'+ skip=+\\\\\|\\'+ end=+'+
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Numbers and hexidecimal values
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
55 syn match mysqlNumber "-\=\<[0-9]*\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
56 syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*\>"
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1624
diff changeset
57 syn match mysqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>"
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
58 syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>"
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
59 syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " User variables
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
62 syn match mysqlVariable "@\a*[A-Za-z0-9]*\([._]*[A-Za-z0-9]\)*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
64 " Escaped column names
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
65 syn match mysqlEscaped "`[^`]*`"
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
66
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " Comments (c-style, mysql-style and modified sql-style)
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
68 syn region mysqlComment start="/\*" end="\*/"
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
69 syn match mysqlComment "#.*"
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
70 syn match mysqlComment "--\_s.*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn sync ccomment mysqlComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " Column types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " This gets a bit ugly. There are two different problems we have to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " deal with.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 "
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
78 " The first problem is that some keywords like 'float' can be used
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " both with and without specifiers, i.e. 'float', 'float(1)' and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " 'float(@var)' are all valid. We have to account for this and we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " also have to make sure that garbage like floatn or float_(1) is not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " highlighted.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " The second problem is that some of these keywords are included in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 " function names. For instance, year() is part of the name of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " dayofyear() function, and the dec keyword (no parenthesis) is part of
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
87 " the name of the decode() function.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
89 syn keyword mysqlType tinyint smallint mediumint int integer bigint
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
90 syn keyword mysqlType date datetime time bit bool
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
91 syn keyword mysqlType tinytext mediumtext longtext text
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
92 syn keyword mysqlType tinyblob mediumblob longblob blob
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
93 syn region mysqlType start="float\W" end="."me=s-1
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
94 syn region mysqlType start="float$" end="."me=s-1
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
95 syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
96 syn region mysqlType start="double\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
97 syn region mysqlType start="double$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
98 syn region mysqlType start="double(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
99 syn region mysqlType start="double precision\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
100 syn region mysqlType start="double precision$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
101 syn region mysqlType start="double precision(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
102 syn region mysqlType start="real\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
103 syn region mysqlType start="real$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
104 syn region mysqlType start="real(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
105 syn region mysqlType start="numeric(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
106 syn region mysqlType start="dec\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
107 syn region mysqlType start="dec$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
108 syn region mysqlType start="dec(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
109 syn region mysqlType start="decimal\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
110 syn region mysqlType start="decimal$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
111 syn region mysqlType start="decimal(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
112 syn region mysqlType start="\Wtimestamp\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
113 syn region mysqlType start="\Wtimestamp$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
114 syn region mysqlType start="\Wtimestamp(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
115 syn region mysqlType start="^timestamp\W" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
116 syn region mysqlType start="^timestamp$" end="."me=s-1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
117 syn region mysqlType start="^timestamp(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
118 syn region mysqlType start="\Wyear(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
119 syn region mysqlType start="^year(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
120 syn region mysqlType start="char(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
121 syn region mysqlType start="varchar(" end=")" contains=mysqlNumber,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
122 syn region mysqlType start="enum(" end=")" contains=mysqlString,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
123 syn region mysqlType start="\Wset(" end=")" contains=mysqlString,mysqlVariable
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
124 syn region mysqlType start="^set(" end=")" contains=mysqlString,mysqlVariable
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 " Logical, string and numeric operators
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
127 syn keyword mysqlOperator between not and or is in like regexp rlike binary exists
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
128 syn region mysqlOperator start="isnull(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
129 syn region mysqlOperator start="coalesce(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
130 syn region mysqlOperator start="interval(" end=")" contains=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 " Control flow functions
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
133 syn keyword mysqlFlow case when then else end
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
134 syn region mysqlFlow start="ifnull(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
135 syn region mysqlFlow start="nullif(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
136 syn region mysqlFlow start="if(" end=")" contains=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 " General Functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 " I'm leery of just defining keywords for functions, since according to the MySQL manual:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 "
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
142 " Function names do not clash with table or column names. For example, ABS is a
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
143 " valid column name. The only restriction is that for a function call, no spaces
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
144 " are allowed between the function name and the `(' that follows it.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 "
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
146 " This means that if I want to highlight function names properly, I have to use a
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
147 " region to define them, not just a keyword. This will probably cause the syntax file
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 " to load more slowly, but at least it will be 'correct'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
150 syn region mysqlFunction start="abs(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
151 syn region mysqlFunction start="acos(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
152 syn region mysqlFunction start="adddate(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
153 syn region mysqlFunction start="ascii(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
154 syn region mysqlFunction start="asin(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
155 syn region mysqlFunction start="atan(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
156 syn region mysqlFunction start="atan2(" end=")" contains=ALL
8876
47f17f66da3d commit https://github.com/vim/vim/commit/03413f44167c4b5cd0012def9bb331e2518c83cf
Christian Brabandt <cb@256bit.org>
parents: 2152
diff changeset
157 syn region mysqlFunction start="avg(" end=")" contains=ALL
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
158 syn region mysqlFunction start="benchmark(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
159 syn region mysqlFunction start="bin(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
160 syn region mysqlFunction start="bit_and(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
161 syn region mysqlFunction start="bit_count(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
162 syn region mysqlFunction start="bit_or(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
163 syn region mysqlFunction start="ceiling(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
164 syn region mysqlFunction start="character_length(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
165 syn region mysqlFunction start="char_length(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
166 syn region mysqlFunction start="concat(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
167 syn region mysqlFunction start="concat_ws(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
168 syn region mysqlFunction start="connection_id(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
169 syn region mysqlFunction start="conv(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
170 syn region mysqlFunction start="cos(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
171 syn region mysqlFunction start="cot(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
172 syn region mysqlFunction start="count(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
173 syn region mysqlFunction start="curdate(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
174 syn region mysqlFunction start="curtime(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
175 syn region mysqlFunction start="date_add(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
176 syn region mysqlFunction start="date_format(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
177 syn region mysqlFunction start="date_sub(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
178 syn region mysqlFunction start="dayname(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
179 syn region mysqlFunction start="dayofmonth(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
180 syn region mysqlFunction start="dayofweek(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
181 syn region mysqlFunction start="dayofyear(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
182 syn region mysqlFunction start="decode(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
183 syn region mysqlFunction start="degrees(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
184 syn region mysqlFunction start="elt(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
185 syn region mysqlFunction start="encode(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
186 syn region mysqlFunction start="encrypt(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
187 syn region mysqlFunction start="exp(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
188 syn region mysqlFunction start="export_set(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
189 syn region mysqlFunction start="extract(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
190 syn region mysqlFunction start="field(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
191 syn region mysqlFunction start="find_in_set(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
192 syn region mysqlFunction start="floor(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
193 syn region mysqlFunction start="format(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
194 syn region mysqlFunction start="from_days(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
195 syn region mysqlFunction start="from_unixtime(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
196 syn region mysqlFunction start="get_lock(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
197 syn region mysqlFunction start="greatest(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
198 syn region mysqlFunction start="group_unique_users(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
199 syn region mysqlFunction start="hex(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
200 syn region mysqlFunction start="inet_aton(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
201 syn region mysqlFunction start="inet_ntoa(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
202 syn region mysqlFunction start="instr(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
203 syn region mysqlFunction start="lcase(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
204 syn region mysqlFunction start="least(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
205 syn region mysqlFunction start="length(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
206 syn region mysqlFunction start="load_file(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
207 syn region mysqlFunction start="locate(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
208 syn region mysqlFunction start="log(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
209 syn region mysqlFunction start="log10(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
210 syn region mysqlFunction start="lower(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
211 syn region mysqlFunction start="lpad(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
212 syn region mysqlFunction start="ltrim(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
213 syn region mysqlFunction start="make_set(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
214 syn region mysqlFunction start="master_pos_wait(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
215 syn region mysqlFunction start="max(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
216 syn region mysqlFunction start="md5(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
217 syn region mysqlFunction start="mid(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
218 syn region mysqlFunction start="min(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
219 syn region mysqlFunction start="mod(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
220 syn region mysqlFunction start="monthname(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
221 syn region mysqlFunction start="now(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
222 syn region mysqlFunction start="oct(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
223 syn region mysqlFunction start="octet_length(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
224 syn region mysqlFunction start="ord(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
225 syn region mysqlFunction start="period_add(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
226 syn region mysqlFunction start="period_diff(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
227 syn region mysqlFunction start="pi(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
228 syn region mysqlFunction start="position(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
229 syn region mysqlFunction start="pow(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
230 syn region mysqlFunction start="power(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
231 syn region mysqlFunction start="quarter(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
232 syn region mysqlFunction start="radians(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
233 syn region mysqlFunction start="rand(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
234 syn region mysqlFunction start="release_lock(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
235 syn region mysqlFunction start="repeat(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
236 syn region mysqlFunction start="reverse(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
237 syn region mysqlFunction start="round(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
238 syn region mysqlFunction start="rpad(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
239 syn region mysqlFunction start="rtrim(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
240 syn region mysqlFunction start="sec_to_time(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
241 syn region mysqlFunction start="session_user(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
242 syn region mysqlFunction start="sign(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
243 syn region mysqlFunction start="sin(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
244 syn region mysqlFunction start="soundex(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
245 syn region mysqlFunction start="space(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
246 syn region mysqlFunction start="sqrt(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
247 syn region mysqlFunction start="std(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
248 syn region mysqlFunction start="stddev(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
249 syn region mysqlFunction start="strcmp(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
250 syn region mysqlFunction start="subdate(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
251 syn region mysqlFunction start="substring(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
252 syn region mysqlFunction start="substring_index(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
253 syn region mysqlFunction start="subtime(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
254 syn region mysqlFunction start="sum(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
255 syn region mysqlFunction start="sysdate(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
256 syn region mysqlFunction start="system_user(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
257 syn region mysqlFunction start="tan(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
258 syn region mysqlFunction start="time_format(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
259 syn region mysqlFunction start="time_to_sec(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
260 syn region mysqlFunction start="to_days(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
261 syn region mysqlFunction start="trim(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
262 syn region mysqlFunction start="ucase(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
263 syn region mysqlFunction start="unique_users(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
264 syn region mysqlFunction start="unix_timestamp(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
265 syn region mysqlFunction start="upper(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
266 syn region mysqlFunction start="user(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
267 syn region mysqlFunction start="version(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
268 syn region mysqlFunction start="week(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
269 syn region mysqlFunction start="weekday(" end=")" contains=ALL
18ee39301b82 updated for version 7.2a
vimboss
parents: 1126
diff changeset
270 syn region mysqlFunction start="yearweek(" end=")" contains=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 8876
diff changeset
273 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
275 hi def link mysqlKeyword Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
276 hi def link mysqlSpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
277 hi def link mysqlString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
278 hi def link mysqlNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
279 hi def link mysqlVariable Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
280 hi def link mysqlComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
281 hi def link mysqlType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
282 hi def link mysqlOperator Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
283 hi def link mysqlFlow Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
284 hi def link mysqlFunction Function
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 let b:current_syntax = "mysql"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288