| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight.tcl</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Tcl/Tk) - Theme (Breeze Light)"/> |
| 6 |
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre> |
| 7 |
<span style="color:#898887;"># tcl syntax highlighting sample script for Kate</span> |
| 8 |
<span style="color:#898887;">#</span> |
| 9 |
<span style="color:#898887;"># author: JM. Philippe 15/03/04</span> |
| 10 |
|
| 11 |
<span style="color:#898887;"># escaped characters</span> |
| 12 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\{</span> |
| 13 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\{</span> |
| 14 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\"</span> |
| 15 |
<span style="font-weight:bold;">set</span> String <span style="color:#bf0303;">" </span><span style="color:#924c9d;">\"</span><span style="color:#bf0303;"> "</span> |
| 16 |
<span style="font-weight:bold;">set</span> String <span style="color:#bf0303;">" </span><span style="color:#924c9d;">\{</span><span style="color:#bf0303;"> "</span> |
| 17 |
|
| 18 |
<span style="color:#898887;">#comments and not comments</span> |
| 19 |
<span style="color:#898887;"># is comments</span> |
| 20 |
;<span style="color:#898887;">#is comments</span> |
| 21 |
<span style="color:#898887;"># is comments</span> |
| 22 |
<span style="color:#898887;"># <h1> is html comment </h1></span> |
| 23 |
<span style="font-weight:bold;">puts</span> ok; <span style="color:#898887;"># is comments</span> |
| 24 |
<span style="font-weight:bold;">set</span> String <span style="font-weight:bold;">[string</span> <span style="color:#006e28;">map</span> <span style="font-weight:bold;">{</span></a> <span style="font-weight:bold;">{</span><span>&#187;<span style="color:#006e28;">is</span> not comments</span></a><span style="font-weight:bold;">}}</span> <span style="color:#0057ae;">$String</span><span style="font-weight:bold;">]</span> |
| 25 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\#</span>not_a_comment |
| 26 |
|
| 27 |
<span style="color:#898887;"># blocks</span> |
| 28 |
<span style="font-weight:bold;">proc</span> test <span style="font-weight:bold;">{</span>arg1 <span style="font-weight:bold;">{</span>arg2 <span style="font-weight:bold;">{}}</span> <span style="font-weight:bold;">{</span>arg3 <span style="font-weight:bold;">{</span>fr fq r<span style="font-weight:bold;">}}}</span> <span style="font-weight:bold;">{</span> |
| 29 |
<span style="font-weight:bold;">if</span> <span style="font-weight:bold;">{</span><span style="color:#b08000;">1</span><span style="font-weight:bold;">}</span> <span style="font-weight:bold;">{</span>; <span style="color:#898887;">#comments</span> |
| 30 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\{</span>; <span style="color:#898887;"># not a block start</span> |
| 31 |
<span style="font-weight:bold;">}</span> |
| 32 |
<span style="font-weight:bold;">}</span> |
| 33 |
|
| 34 |
<span style="font-weight:bold;">proc</span> test <span style="color:#006e28;">args</span> <span style="font-weight:bold;">{</span> |
| 35 |
<span style="font-weight:bold;">set</span> String <span style="color:#924c9d;">\}</span>; <span style="color:#898887;"># not a block end</span> |
| 36 |
<span style="font-weight:bold;">}</span> |
| 37 |
|
| 38 |
<span style="color:#0057ae;background-color:#e0e9f8;"># BEGIN - collapsable comments</span> |
| 39 |
<span style="color:#898887;"># blablabla</span> |
| 40 |
<span style="color:#0057ae;background-color:#e0e9f8;"># END</span> |
| 41 |
|
| 42 |
<span style="color:#898887;"># strings</span> |
| 43 |
<span style="font-weight:bold;">set</span> String <span style="color:#bf0303;">"feqr feqr </span><span style="color:#0057ae;">$</span><span style="color:#bf0303;">gqer gqe"</span> |
| 44 |
<span style="font-weight:bold;">set</span> String <span style="color:#bf0303;">"feqr</span> |
| 45 |
<span style="color:#bf0303;">feqr </span><span style="color:#924c9d;">\"</span><span style="color:#bf0303;"> </span><span style="color:#0057ae;">$</span><span style="color:#bf0303;">gqer \</span> |
| 46 |
<span style="color:#bf0303;">gqe</span> |
| 47 |
<span style="color:#bf0303;">"</span> |
| 48 |
<span style="font-weight:bold;">set</span> String <span style="font-weight:bold;">{</span>feqr |
| 49 |
feqr <span style="color:#924c9d;">\{</span> <span style="color:#0057ae;">$gqer</span> \ |
| 50 |
gqe |
| 51 |
<span style="font-weight:bold;">}</span> |
| 52 |
|
| 53 |
<span style="color:#898887;"># variables</span> |
| 54 |
<span style="font-weight:bold;">set</span> b+<span style="color:#b08000;">1</span> <span style="font-weight:bold;">[incr</span> b<span style="font-weight:bold;">]</span> |
| 55 |
<span style="font-weight:bold;">set</span> <span style="font-weight:bold;">{incr</span>-b<span style="font-weight:bold;">}</span> <span style="color:#0057ae;">${b+1}</span> |
| 56 |
<span style="font-weight:bold;">puts</span> <span style="color:#0057ae;">${incr-b}</span> |
| 57 |
</pre></body></html> |