Start anew
[git/jnareb-git.git] / share / vim / vim58 / syntax / stp.vim
blobb033dfafcd103cf30926f94828bafd25c0ce3641
1 " Vim syntax file
2 "    Language: Stored Procedures (STP)
3 "  Maintainer: Jeff Lanzarotta (frizbeefanatic@yahoo.com)
4 "         URL: http://lanzarotta.tripod.com/vim/syntax/plsql.vim.zip
5 " Last Change: April 30, 2001
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 " The STP reserved words, defined as keywords.
19 syn keyword stpSpecial    null
21 syn keyword stpKeyword    begin break call case create deallocate dynamic else
22 syn keyword stpKeyword    elseif end execute for from function go grant if
23 syn keyword stpKeyword    index insert into max min on output procedure public
24 syn keyword stpKeyword    result return returns scroll table then to when while
26 syn keyword stpOperator   asc not and or desc group having in is any some all
27 syn keyword stpOperator   between exists like escape with union intersect minus
28 syn keyword stpOperator   out prior distinct sysdate
30 syn keyword stpStatement  alter analyze as audit avg by close clustered comment
31 syn keyword stpStatement  commit continue count create cursor declare delete
32 syn keyword stpStatement  drop exec execute explain fetch from index insert
33 syn keyword stpStatement  into lock max min next noaudit nonclustered open order
34 syn keyword stpStatement  output print raiserror recompile rename revoke
35 syn keyword stpStatement  rollback savepoint select set sum transaction
36 syn keyword stpStatement  truncate unique update values where
38 syn keyword stpFunction   abs acos ascii asin atan atn2 avg ceiling charindex
39 syn keyword stpFunction   charlength convert col_name col_length cos cot count
40 syn keyword stpFunction   curunreservedpgs datapgs datalength dateadd datediff
41 syn keyword stpFunction   datename datepart db_id db_name degree difference
42 syn keyword stpFunction   exp floor getdate hextoint host_id host_name index_col
43 syn keyword stpFunction   inttohex isnull lct_admin log log10 lower ltrim max
44 syn keyword stpFunction   min now object_id object_name patindex pi pos power
45 syn keyword stpFunction   proc_role radians rand replace replicate reserved_pgs
46 syn keyword stpFunction   reverse right rtrim rowcnt round show_role sign sin
47 syn keyword stpFunction   soundex space sqrt str stuff substr substring sum
48 syn keyword stpFunction   suser_id suser_name tan tsequal upper used_pgs user
49 syn keyword stpFunction   user_id user_name valid_name valid_user
51 syn keyword stpType       binary bit char datetime decimal double float image
52 syn keyword stpType       int integer long money nchar numeric precision real
53 syn keyword stpType       smalldatetime smallint smallmoney text time tinyint
54 syn keyword stpType       timestamp varbinary varchar
56 syn keyword stpGlobals    @@char_convert @@cient_csname @@client_csid
57 syn keyword stpGlobals    @@connections @@cpu_busy @@error @@identity
58 syn keyword stpGlobals    @@idle @@io_busy @@isolation @@langid @@language
59 syn keyword stpGlobals    @@maxcharlen @@max_connections @@ncharsize
60 syn keyword stpGlobals    @@nestlevel @@packet_errors @@pack_received
61 syn keyword stpGlobals    @@pack_sent @@procid @@rowcount @@servername
62 syn keyword stpGlobals    @@spid @@sqlstatus @@testts @@textcolid @@textdbid
63 syn keyword stpGlobals    @@textobjid @@textptr @@textsize @@thresh_hysteresis
64 syn keyword stpGlobals    @@timeticks @@total_error @@total_read @@total_write
65 syn keyword stpGlobals    @@tranchained @@trancount @@transtate @@version
67 syn keyword stpTodo       TODO FIXME XXX DEBUG NOTE
69 " Strings and characters:
70 syn match   stpStringError  "'.*$"
71 syn match   stpString         "'\([^']\|''\)*'"
73 " Numbers:
74 syn match   stpNumber             "-\=\<\d*\.\=[0-9_]\>"
76 " Comments:
77 syn region  stpComment    start="/\*"  end="\*/" contains=stpTodo
78 syn match   stpComment    "--.*" contains=stpTodo
80 " Parens:
81 syn region  stpParen      transparent start='(' end=')' contains=ALLBUT,stpParenError
82 syn match   stpParenError ")"
84 " Syntax Synchronizing
85 syn sync    minlines=10 maxlines=100
87 " Syntax Synchronizing
88 syn sync minlines=10 maxlines=100
90 " Define the default highlighting.
91 " For version 5.x and earlier, only when not done already.
92 " For version 5.8 and later, only when and item doesn't have highlighting yet.
93 if version >= 508 || !exists("did_stp_syn_inits")
94   if version < 508
95     let did_stp_syn_inits = 1
96     command -nargs=+ HiLink hi link <args>
97   else
98     command -nargs=+ HiLink hi def link <args>
99   endif
101   HiLink stpComment Comment
102   HiLink stpKeyword Keyword
103   HiLink stpNumber      Number
104   HiLink stpOperator    Operator
105   HiLink stpSpecial Special
106   HiLink stpStatement   Statement
107   HiLink stpString      String
108   HiLink stpStringError Error
109   HiLink stpType Type
110   HiLink stpTodo Todo
111   HiLink stpFunction    Function
112   HiLink stpGlobals Macro
113   HiLink stpParen Normal
114   HiLink stpParenError Error
115   HiLink stpSQLKeyword Function
117   delcommand HiLink
118 endif
120 let b:current_syntax = "stp"
122 " vim ts=8 sw=2