annotate runtime/syntax/sqlforms.vim @ 27:a01d8d9b2a58 first-working-version

first working version.
author kono
date Mon, 27 Oct 2008 18:28:11 +0900
parents 76efa0be13f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: SQL*Forms (Oracle 7), based on sql.vim (vim5.0)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Austin Ziegler (austin@halostatue.ca)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " Last Change: 2003 May 11
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 " Prev Change: 19980710
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 " URL: http://www.halostatue.ca/vim/syntax/proc.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 "
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 " TODO Find a new maintainer who knows SQL*Forms.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 " For version 5.x, clear all syntax items.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 " For version 6.x, quit when a syntax file was already loaded.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 syntax clear
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 elseif exists("b:current_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 finish
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 syntax case ignore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 if version >= 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 setlocal iskeyword=a-z,A-Z,48-57,_,.,-,>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 set iskeyword=a-z,A-Z,48-57,_,.,-,>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 " The SQL reserved words, defined as keywords.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 syntax match sqlTriggers /on-.*$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 syntax match sqlTriggers /key-.*$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 syntax match sqlTriggers /post-.*$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 syntax match sqlTriggers /pre-.*$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 syntax match sqlTriggers /user-.*$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 syntax keyword sqlSpecial null false true
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 syntax keyword sqlProcedure abort_query anchor_view bell block_menu break call
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 syntax keyword sqlProcedure call_input call_query clear_block clear_eol
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 syntax keyword sqlProcedure clear_field clear_form clear_record commit_form
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39 syntax keyword sqlProcedure copy count_query create_record default_value
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 syntax keyword sqlProcedure delete_record display_error display_field down
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 syntax keyword sqlProcedure duplicate_field duplicate_record edit_field
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 syntax keyword sqlProcedure enter enter_query erase execute_query
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 syntax keyword sqlProcedure execute_trigger exit_form first_Record go_block
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 syntax keyword sqlProcedure go_field go_record help hide_menu hide_page host
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 syntax keyword sqlProcedure last_record list_values lock_record message
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 syntax keyword sqlProcedure move_view new_form next_block next_field next_key
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 syntax keyword sqlProcedure next_record next_set pause post previous_block
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 syntax keyword sqlProcedure previous_field previous_record print redisplay
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 syntax keyword sqlProcedure replace_menu resize_view scroll_down scroll_up
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 syntax keyword sqlProcedure set_field show_keys show_menu show_page
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 syntax keyword sqlProcedure synchronize up user_exit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 syntax keyword sqlFunction block_characteristic error_code error_text
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 syntax keyword sqlFunction error_type field_characteristic form_failure
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55 syntax keyword sqlFunction form_fatal form_success name_in
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 syntax keyword sqlParameters hide no_hide replace no_replace ask_commit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 syntax keyword sqlParameters do_commit no_commit no_validate all_records
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 syntax keyword sqlParameters for_update no_restrict restrict no_screen
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 syntax keyword sqlParameters bar full_screen pull_down auto_help auto_skip
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 syntax keyword sqlParameters fixed_length enterable required echo queryable
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 syntax keyword sqlParameters updateable update_null upper_case attr_on
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 syntax keyword sqlParameters attr_off base_table first_field last_field
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 syntax keyword sqlParameters datatype displayed display_length field_length
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 syntax keyword sqlParameters list page primary_key query_length x_pos y_pos
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 syntax match sqlSystem /system\.block_status/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 syntax match sqlSystem /system\.current_block/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 syntax match sqlSystem /system\.current_field/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 syntax match sqlSystem /system\.current_form/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 syntax match sqlSystem /system\.current_value/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 syntax match sqlSystem /system\.cursor_block/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 syntax match sqlSystem /system\.cursor_field/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 syntax match sqlSystem /system\.cursor_record/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 syntax match sqlSystem /system\.cursor_value/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 syntax match sqlSystem /system\.form_status/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 syntax match sqlSystem /system\.last_query/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 syntax match sqlSystem /system\.last_record/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 syntax match sqlSystem /system\.message_level/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 syntax match sqlSystem /system\.record_status/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 syntax match sqlSystem /system\.trigger_block/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 syntax match sqlSystem /system\.trigger_field/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 syntax match sqlSystem /system\.trigger_record/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 syntax match sqlSystem /\$\$date\$\$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 syntax match sqlSystem /\$\$time\$\$/
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 syntax keyword sqlKeyword accept access add as asc by check cluster column
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 syntax keyword sqlKeyword compress connect current decimal default
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 syntax keyword sqlKeyword desc exclusive file for from group
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 syntax keyword sqlKeyword having identified immediate increment index
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 syntax keyword sqlKeyword initial into is level maxextents mode modify
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 syntax keyword sqlKeyword nocompress nowait of offline on online start
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 syntax keyword sqlKeyword successful synonym table to trigger uid
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94 syntax keyword sqlKeyword unique user validate values view whenever
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 syntax keyword sqlKeyword where with option order pctfree privileges
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96 syntax keyword sqlKeyword public resource row rowlabel rownum rows
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 syntax keyword sqlKeyword session share size smallint sql\*forms_version
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 syntax keyword sqlKeyword terse define form name title procedure begin
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99 syntax keyword sqlKeyword default_menu_application trigger block field
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100 syntax keyword sqlKeyword enddefine declare exception raise when cursor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 syntax keyword sqlKeyword definition base_table pragma
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102 syntax keyword sqlKeyword column_name global trigger_type text description
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 syntax match sqlKeyword "<<<"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104 syntax match sqlKeyword ">>>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 syntax keyword sqlOperator not and or out to_number to_date message erase
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 syntax keyword sqlOperator in any some all between exists substr nvl
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108 syntax keyword sqlOperator exception_init
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 syntax keyword sqlOperator like escape trunc lpad rpad sum
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 syntax keyword sqlOperator union intersect minus to_char greatest
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 syntax keyword sqlOperator prior distinct decode least avg
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112 syntax keyword sqlOperator sysdate true false field_characteristic
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 syntax keyword sqlOperator display_field call host
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115 syntax keyword sqlStatement alter analyze audit comment commit create
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116 syntax keyword sqlStatement delete drop explain grant insert lock noaudit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117 syntax keyword sqlStatement rename revoke rollback savepoint select set
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 syntax keyword sqlStatement truncate update if elsif loop then
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 syntax keyword sqlStatement open fetch close else end
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 syntax keyword sqlType char character date long raw mlslabel number rowid
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 syntax keyword sqlType varchar varchar2 float integer boolean global
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 syntax keyword sqlCodes sqlcode no_data_found too_many_rows others
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 syntax keyword sqlCodes form_trigger_failure notfound found
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126 syntax keyword sqlCodes validate no_commit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 " Comments:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129 syntax region sqlComment start="/\*" end="\*/"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 syntax match sqlComment "--.*"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132 " Strings and characters:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133 syntax region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134 syntax region sqlString start=+'+ skip=+\\\\\|\\"+ end=+'+
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 " Numbers:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139 syntax sync ccomment sqlComment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141 if version >= 508 || !exists("did_sqlforms_syn_inits")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 if version < 508
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143 let did_sqlforms_syn_inits = 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 command -nargs=+ HiLink hi link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 command -nargs=+ HiLink hi def link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 HiLink sqlComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150 HiLink sqlKeyword Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151 HiLink sqlNumber Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 HiLink sqlOperator Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 HiLink sqlProcedure Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154 HiLink sqlFunction Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155 HiLink sqlSystem Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 HiLink sqlSpecial Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 HiLink sqlStatement Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158 HiLink sqlString String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 HiLink sqlType Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 HiLink sqlCodes Identifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161 HiLink sqlTriggers PreProc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 delcommand HiLink
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166 let b:current_syntax = "sqlforms"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
167
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
168 " vim: ts=8 sw=4