annotate runtime/syntax/stp.vim @ 3676:f07475816079 v7.3.598

updated for version 7.3.598 Problem: Cannot act upon end of completion. (Taro Muraoka) Solution: Add an autocommand event that is triggered when completion has finished. (Idea by Florian Klein)
author Bram Moolenaar <bram@vim.org>
date Tue, 10 Jul 2012 17:14:56 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
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: Stored Procedures (STP)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Jeff Lanzarotta (jefflanzarotta@yahoo.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: March 05, 2002
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x, clear all syntax items.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x, quit when a syntax file was already loaded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
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 " Specials.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword stpSpecial null
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Keywords.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword stpKeyword begin break call case create deallocate dynamic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword stpKeyword execute from function go grant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword stpKeyword index insert into leave max min on output procedure
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword stpKeyword public result return returns scroll table to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword stpKeyword when
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match stpKeyword "\<end\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Conditional.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword stpConditional if else elseif then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match stpConditional "\<end\s\+if\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Repeats.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword stpRepeat for while loop
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match stpRepeat "\<end\s\+loop\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Operators.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword stpOperator asc not and or desc group having in is any some all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword stpOperator between exists like escape with union intersect minus
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword stpOperator out prior distinct sysdate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " Statements.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword stpStatement alter analyze as audit avg by close clustered comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword stpStatement commit continue count create cursor declare delete
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword stpStatement drop exec execute explain fetch from index insert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword stpStatement into lock max min next noaudit nonclustered open
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword stpStatement order output print raiserror recompile rename revoke
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword stpStatement rollback savepoint select set sum transaction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword stpStatement truncate unique update values where
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Functions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword stpFunction abs acos ascii asin atan atn2 avg ceiling charindex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword stpFunction charlength convert col_name col_length cos cot count
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword stpFunction curunreservedpgs datapgs datalength dateadd datediff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword stpFunction datename datepart db_id db_name degree difference
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword stpFunction exp floor getdate hextoint host_id host_name index_col
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword stpFunction inttohex isnull lct_admin log log10 lower ltrim max
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword stpFunction min now object_id object_name patindex pi pos power
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword stpFunction proc_role radians rand replace replicate reserved_pgs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword stpFunction reverse right rtrim rowcnt round show_role sign sin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword stpFunction soundex space sqrt str stuff substr substring sum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword stpFunction suser_id suser_name tan tsequal upper used_pgs user
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword stpFunction user_id user_name valid_name valid_user message
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " Types.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword stpType binary bit char datetime decimal double float image
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword stpType int integer long money nchar numeric precision real
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword stpType smalldatetime smallint smallmoney text time tinyint
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword stpType timestamp varbinary varchar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " Globals.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match stpGlobals '@@char_convert'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match stpGlobals '@@cient_csname'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match stpGlobals '@@client_csid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match stpGlobals '@@connections'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match stpGlobals '@@cpu_busy'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match stpGlobals '@@error'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match stpGlobals '@@identity'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn match stpGlobals '@@idle'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match stpGlobals '@@io_busy'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match stpGlobals '@@isolation'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match stpGlobals '@@langid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn match stpGlobals '@@language'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match stpGlobals '@@max_connections'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match stpGlobals '@@maxcharlen'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match stpGlobals '@@ncharsize'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match stpGlobals '@@nestlevel'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn match stpGlobals '@@pack_received'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn match stpGlobals '@@pack_sent'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match stpGlobals '@@packet_errors'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn match stpGlobals '@@procid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match stpGlobals '@@rowcount'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match stpGlobals '@@servername'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match stpGlobals '@@spid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match stpGlobals '@@sqlstatus'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match stpGlobals '@@testts'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match stpGlobals '@@textcolid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn match stpGlobals '@@textdbid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn match stpGlobals '@@textobjid'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn match stpGlobals '@@textptr'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match stpGlobals '@@textsize'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match stpGlobals '@@thresh_hysteresis'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match stpGlobals '@@timeticks'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match stpGlobals '@@total_error'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match stpGlobals '@@total_read'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match stpGlobals '@@total_write'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match stpGlobals '@@tranchained'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match stpGlobals '@@trancount'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match stpGlobals '@@transtate'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match stpGlobals '@@version'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 " Todos.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn keyword stpTodo TODO FIXME XXX DEBUG NOTE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " Strings and characters.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match stpStringError "'.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn match stpString "'\([^']\|''\)*'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " Numbers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn match stpNumber "-\=\<\d*\.\=[0-9_]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " Comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn region stpComment start="/\*" end="\*/" contains=stpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn match stpComment "--.*" contains=stpTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn sync ccomment stpComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 " Parens.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 syn region stpParen transparent start='(' end=')' contains=ALLBUT,stpParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 syn match stpParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 " Syntax Synchronizing.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 syn sync minlines=10 maxlines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 " For version 5.x and earlier, only when not done already.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " For version 5.8 and later, only when and item doesn't have highlighting yet.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 if version >= 508 || !exists("did_stp_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 let did_stp_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 HiLink stpConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 HiLink stpComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 HiLink stpKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 HiLink stpNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 HiLink stpOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 HiLink stpSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 HiLink stpStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 HiLink stpString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 HiLink stpStringError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 HiLink stpType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 HiLink stpTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 HiLink stpFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 HiLink stpGlobals Macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 HiLink stpParen Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 HiLink stpParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 HiLink stpSQLKeyword Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 HiLink stpRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 let b:current_syntax = "stp"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 " vim ts=8 sw=2