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