Serve para qualquer linguagem, desde que o arquivo .SYN seja devidamente configurado.
Crie um arquivo chamado PLSQL.SYN e salve-o na pasta C:\Program Files\TextPad 5\system. Atente que TextPad 5 pode variar conforme a versão do TextPad.
1: C=1 2: 3: [Syntax] 4: Namespace1 = 6 5: IgnoreCase = Yes 6: InitKeyWordChars = A-Za-z_ 7: KeyWordChars = A-Za-z0-9_ 8: PreprocStart = 9: SyntaxStart = 10: SyntaxEnd =11: CommentStart = /*
12: CommentEnd = */
13: CommentStartAlt = 14: CommentEndAlt = 15: SingleComment = --
16: SingleCommentCol =
17: StringStart = '
18: StringEnd = ' 19: StringAlt = 20: StringEsc =21: CharStart = '
22: CharEnd = ' 23: CharEsc = 24: 25: [Keywords 1] 26: (+)27: all
28: and
29: any
30: as
31: between
32: cast
33: commit
34: connect by
35: cube
36: delete
37: distinct
38: exists
39: explain plan
40: for update
41: from
42: group by
43: having
44: in
45: insert46: is null
47: like
48: lock table
49: intersect
50: multiset 51: minus52: not
53: or
54: order by
55: partition 56: returning57: rollback
58: rollup
59: sample60: savepoint
61: select
62: set constraint
63: set transaction
64: some
65: start with
66: subpartition67: table
68: the69: union
70: update
71: values
72: where
73: where current of
74: with
75: 76: [Keywords 2] 77: abs 78: acos 79: add_months 80: ascii 81: asin 82: atan 83: atan284: avg
85: bfilename 86: bitand 87: ceil 88: chartorowid 89: chr 90: concat91: convert
92: cos 93: cosh94: count
95: dangling 96: decode97: deref
98: dump
99: empty_blob 100: empty_clob101: exists
102: exp 103: floor 104: glb 105: greatest106: grouping
107: hextoraw 108: initcap 109: instr 110: instrb 111: last_day 112: least 113: length 114: lengthb115: like
116: ln 117: log118: lower
119: lpad 120: ltrim 121: make_ref122: max
123: min
124: mod 125: months_between 126: new_time 127: next_day 128: nls_charset_decl_len 129: nls_charset_id 130: nls_charset_name 131: nls_initcap 132: nls_lower 133: nls_upper 134: nlssort135: null
136: nvl 137: power 138: rawtohex139: ref
140: reftohex 141: replace 142: round 143: rowidtochar 144: rpad 145: rtrim 146: sign 147: sin 148: sinh 149: soundex 150: sqrt 151: stddev 152: substr 153: substrb154: sum
155: sys_context 156: sys_guid 157: sysdate 158: tan 159: tanh 160: to_char 161: to_date 162: to_lob 163: to_multi_byte 164: to_number165: translate
166: trim
167: trunc 168: uid169: upper
170: user
171: userenv 172: variance 173: vsize 174: 175: [Keywords 3]176: level
177: currval 178: nextval 179: rownum 180: rowid 181: 182: [Keywords 4]183: %found
184: %isopen 185: %notfound186: %rowcount
187: %rowtype 188: %type 189: authid 190: autonomous_transaction191: begin
192: bulk collect
193: bulk collect into
194: call
195: close
196: constant197: count
198: create function
199: create package
200: create package body
201: create procedure
202: create trigger
203: create type
204: create type body
205: cursor
206: declare
207: delete
208: else
209: elsif210: end
211: end if
212: exception
213: exception_init214: execute immediate
215: exists
216: exit
217: extend218: fetch
219: first
220: for
221: forall222: function
223: goto
224: if
225: insert226: into
227: label228: language
229: last
230: limit
231: lock table
232: loop233: map
234: member235: next
236: null
237: open
238: open for
239: order
240: pragma241: prior
242: procedure
243: raise 244: raise_application_error 245: record 246: restrict_references247: return
248: savepoint
249: self 250: serially_reusable251: set transaction
252: sql
253: sqlcode
254: sqlerrm 255: subtype256: table
257: then
258: trim
259: type260: when
261: where current of
262: while
263: varchar2 264: number265: boolean
266: binary_integer267: integer
268: char
269: long270: blob
271: clob
272: 273: [Keywords 5] 274: / 275: @ 276: @@ 277: accept 278: attribute279: break
280: btitle 281: clear 282: col283: column
284: comp285: compute
286: def 287: define288: exit
289: ho290: host
291: pause 292: prompt 293: rem 294: remark 295: repf 296: repfooter 297: reph 298: repheader 299: run300: set
301: spool302: start
303: sta 304: timi 305: timing 306: ttitle 307: undef 308: undefine 309: var310: variable
311: 312: [Keywords 6] 313: app 314: appinfo315: array
316: arraysize 317: autocommit 318: autop 319: autoprint 320: autotrace 321: blo 322: blockterminator 323: cmds 324: cmdsep 325: colsep 326: com 327: compatibility 328: con 329: concat 330: copyc 331: copycommit 332: copytypecheck 333: echo 334: esc335: escape
336: feed 337: feedback 338: flu 339: flush 340: hea 341: heading 342: heads 343: headsep 344: lines 345: linesize 346: long 347: longchunksize 348: newpage 349: numformat 350: numwidth 351: pages 352: pause 353: recsep 354: recsepchar 355: serveroutput 356: show 357: showmode 358: sqlcase 359: sqlcontinue 360: sqlnumber 361: sqlprefix 362: sqlprompt 363: suffix 364: tab 365: termout 366: term367: time
368: timing369: trim
370: trimout 371: underline 372: verify 373: wrapRepare que o Namespace1, linha 4, está definido com o valor 6, porque foi criado seis grupos de sintaxe conforme abaixo:
No arquivo existe uma linha contendo [keywords 1], [keywords 2] … [keywords 6] e abaixo de cada uma existem a plavaras que sofreram alteração de cor conforme definido em Configure / Preferences / Document Classes / PL/SQL / Colors
- SQL keywords
- SQL functions
- Pseudo-columns
- PL/SQL keywords
- SQL*Plus formatting commands
- Other SQL*Plus commands.
Agora vá em:
E faça:
Depois copie e cole este texto (*.sql, *.fnc, *.pkb, *.pks, *.prc, *.trg, *.tbl) na janela abaixo
Selecione Enable syntax highlighting e em Syntax definition file selecione o aquivo que criou e salvou na pasta System do TextPad (PLSQL.SYN)
Clique em Next e depois em Finish e pronto, todos os arquivos abertos com a extensões *.sql, *.fnc, *.pkb, *.pks, *.prc, *.trg, *.tbl, terão suas palavras reconhecidas e destacadas confome a configuração default do TextPad.
Para alterar as configurações vá em:
Em Document Classes selecione o Document Class Name criado (PL/SQL) e altere as configurações conforme seu gosto.
Um exemplo de como fica o arquivo. (As cores utilizadas não são as padrões)