~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to examples/syntax/highlight.tcl

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# tcl syntax highlighting sample script for Kate
2
 
#
3
 
# author: JM. Philippe 15/03/04
4
 
 
5
 
# escaped characters
6
 
set String \{
7
 
set String \{
8
 
set String \"
9
 
set String " \" "
10
 
set String " \{ "
11
 
 
12
 
#comments and not comments
13
 
# is comments
14
 
;#is comments
15
 
        # is comments
16
 
# <h1> is html comment </h1>
17
 
puts ok;        # is comments
18
 
set String [string map {</a> {<span>&#187;is not comments</span></a>}} $String]
19
 
set String \#not_a_comment
20
 
 
21
 
# blocks
22
 
proc test {arg1 {arg2 {}} {arg3 {fr fq r}}} {
23
 
        if {1} {;       #comments
24
 
                set String \{;  # not a block start
25
 
        }
26
 
}
27
 
 
28
 
proc test args {
29
 
        set String \};  # not a block end
30
 
}
31
 
 
32
 
# BEGIN - collapsable comments
33
 
# blablabla
34
 
# END
35
 
 
36
 
# strings
37
 
set String "feqr feqr $gqer gqe"
38
 
set String "feqr
39
 
feqr \" $gqer \
40
 
gqe
41
 
"
42
 
set String {feqr
43
 
feqr \{ $gqer \
44
 
gqe
45
 
}
46
 
 
47
 
# variables
48
 
set b+1 [incr b]
49
 
set {incr-b} ${b+1}
50
 
puts ${incr-b}