├── Snippets
├── PROPerty [shape=box].tmSnippet
├── -> (convert ">" to "->").tmSnippet
├── PROPerty [dir =both].tmSnippet
├── PROPerty [plaintext].tmSnippet
├── path a-> {b c d}.tmSnippet
├── path (from -> to [label).tmSnippet
├── PROPerty [styles___].tmSnippet
├── {rank=same|min|max; x; y}.tmSnippet
├── new variable.tmSnippet
└── graph template.tmSnippet
├── Preferences
├── Folding.tmPreferences
└── Miscellaneous.tmPreferences
├── README.mdown
├── Commands
├── Twiddle.tmCommand
├── Open in default app.tmCommand
├── Open in Omnigraffle.tmCommand
└── Generate Graph.tmCommand
├── info.plist
└── Syntaxes
└── DOT.plist
/Snippets/PROPerty [shape=box].tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | [shape=box]
7 | name
8 | PROPerty [shape=box]
9 | scope
10 | source.dot
11 | tabTrigger
12 | prop
13 | uuid
14 | 5A1C3792-81BA-413D-AB43-9DED29F22E18
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/-> (convert ">" to "->").tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ->
7 | name
8 | -> (convert ">" to "->")
9 | scope
10 | source.dot
11 | tabTrigger
12 | >
13 | uuid
14 | C903C77B-C726-47E1-8FB2-9F90DFE6B763
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/PROPerty [dir =both].tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | [dir=${1|back,both,forward,none|}]
7 | name
8 | PROPerty [dir =both…]
9 | scope
10 | source.dot
11 | tabTrigger
12 | dir
13 | uuid
14 | 612DF1E1-034E-4925-8E78-3EE2E2EDDA90
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/PROPerty [plaintext].tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | "${1:Machine: a}" [ shape = plaintext ];
7 | name
8 | New variable [plaintext]
9 | scope
10 | source.dot
11 | tabTrigger
12 | var
13 | uuid
14 | 351180F5-0F3D-4486-A04E-0788FD7C4803
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/path a-> {b c d}.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ${1:From} -> {${2:item1} ${3:item2} $0}
7 | name
8 | Path from-> {to list}
9 | scope
10 | source.dot
11 | tabTrigger
12 | path
13 | uuid
14 | 1D4DF823-1CE3-4011-87AB-04958905098B
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/path (from -> to [label).tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ${1:From} -> ${2:too} [label="${3:.7}";]
7 | name
8 | Path from -> to [label)
9 | scope
10 | source.dot
11 | tabTrigger
12 | path
13 | uuid
14 | B7D66242-840C-473F-8546-33D6947AEFA7
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Preferences/Folding.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Folding
7 | scope
8 | source.dot
9 | settings
10 |
11 | foldingStartMarker
12 | \{
13 | foldingStopMarker
14 | \}
15 |
16 | uuid
17 | 492F0744-66BD-44D5-9315-CB357DB9A041
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Snippets/PROPerty [styles___].tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | [style=dotted; color=red; style=bold,label="100 times"; weight=8]
7 | name
8 | PROPerty [styles...]
9 | scope
10 | source.dot
11 | tabTrigger
12 | prop
13 | uuid
14 | CC54EBCC-8BE6-4105-931B-999242396406
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Snippets/{rank=same|min|max; x; y}.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | {rank=${1|same,min,max,nb:max is bottom|}; ${2:space delimitted list}};
7 |
8 |
9 | name
10 | {rank=same|min|max; x; y}
11 | scope
12 | source.dot
13 | tabTrigger
14 | rank
15 | uuid
16 | F1E71422-DE57-48AF-A95A-8C30632299C2
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/new variable.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | ${1:shortName} [label="${2:$1}", shape="${3|square,rectangle,circle,ellipse,triangle,plaintext,point,diamond,pentagon,hexagon,septagon,octagon,egg,trapezium,parallelogram,house,doublecircle,doubleoctagon,tripleoctagon,invtriangle,invtrapezium,invhouse,Mdiamond,Msquare,Mcircle,none,note,tab,folder,box3d|}"${4:, URL="${5:http://en.wikipedia.org/wiki/John de Fries}"}]
7 | var$0
8 |
9 | name
10 | New variable
11 | scope
12 | source.dot
13 | tabTrigger
14 | var
15 | uuid
16 | CA31A932-3D52-4AC8-B132-005BE95E680F
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Snippets/graph template.tmSnippet:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | content
6 | digraph G {
7 | splines="FALSE";
8 | /* Entities */
9 | ${1:shortName} [label="${2:$1}", shape="${3|square,rectangle,circle,ellipse,triangle,plaintext,point,diamond,pentagon,hexagon,septagon,octagon,egg,trapezium,parallelogram,house,doublecircle,doubleoctagon,tripleoctagon,invtriangle,invtrapezium,invhouse,Mdiamond,Msquare,Mcircle,none,note,tab,folder,box3d|}"${4:, URL="${5:http://en.wikipedia.org/wiki/John de Fries}"}]
10 | var$0
11 |
12 | /* Relationships */
13 | ${6:F1} -> $1${7:[label="${8:.63}"]}
14 | /* Ranks */
15 | { rank=${9|same,min,max,# max is bottom|}; $1;};
16 | }
17 |
18 | name
19 | Graph Template
20 | scope
21 | source.dot
22 | tabTrigger
23 | graph
24 | uuid
25 | AD2AB606-D634-4DFD-9BDA-A53CD235E1C4
26 |
27 |
28 |
--------------------------------------------------------------------------------
/README.mdown:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.
4 |
5 | # General
6 |
7 | * [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_
8 | * [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_
9 | * [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_
10 |
11 | # License
12 |
13 | If not otherwise specified (see below), files in this repository fall under the following license:
14 |
15 | Permission to copy, use, modify, sell and distribute this
16 | software is granted. This software is provided "as is" without
17 | express or implied warranty, and with no claim as to its
18 | suitability for any purpose.
19 |
20 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.
--------------------------------------------------------------------------------
/Commands/Twiddle.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | nop
7 | command
8 | #!/usr/bin/php
9 | <?php
10 | if (0) {
11 | echo "<pre><br>";
12 | $input = "capability -> health;";
13 | echo "you gave me:\n $input\n<hr>";
14 | }else{
15 | $input = $_ENV[TM_SELECTED_TEXT]; // available vars
16 | }
17 |
18 | $input = trim($input, ";");
19 | $aInput = explode(" -> ", $input);
20 |
21 | $aTwiddle = array($aInput[1], $aInput[0]);
22 | $twiddle = implode(" -> ", $aTwiddle). ";";
23 | echo $twiddle;
24 | ?>
25 | fallbackInput
26 | line
27 | input
28 | selection
29 | keyEquivalent
30 | ^t
31 | name
32 | Twiddle
33 | output
34 | replaceSelectedText
35 | scope
36 | source.dot
37 | uuid
38 | D8486A54-3F2A-490B-BF93-E6881BFA5DA9
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Commands/Open in default app.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | nop
7 | command
8 | #!/usr/bin/php
9 | <?php
10 | $input = "open " . escapeshellarg($_ENV[TM_FILEPATH]); // available vars
11 | system($input)
12 | ?>
13 | fallbackInput
14 | document
15 | input
16 | selection
17 | inputFormat
18 | text
19 | keyEquivalent
20 | @r
21 | name
22 | Open in Default App
23 | outputCaret
24 | afterOutput
25 | outputFormat
26 | text
27 | outputLocation
28 | discard
29 | scope
30 | source.dot
31 | semanticClass
32 | process.external.run.dot
33 | uuid
34 | 759C50D4-E121-4147-9506-760096D4A92B
35 | version
36 | 2
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Preferences/Miscellaneous.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Miscellaneous
7 | scope
8 | source.dot
9 | settings
10 |
11 | highlightPairs
12 |
13 |
14 | [
15 | ]
16 |
17 |
18 | {
19 | }
20 |
21 |
22 | <
23 | >
24 |
25 |
26 | increaseIndentPattern
27 | ^\s*\{
28 | smartTypingPairs
29 |
30 |
31 | [
32 | ]
33 |
34 |
35 | "
36 | "
37 |
38 |
39 | {
40 | }
41 |
42 |
43 | <
44 | >
45 |
46 |
47 |
48 | uuid
49 | 10700B07-E666-40AF-BB93-A9FA60DE0904
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Commands/Open in Omnigraffle.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | nop
7 | command
8 | #!/usr/bin/php
9 | <?php
10 | # $input = "open -a '/Applications/OmniGraffle Professional 5.app'" . escapeshellarg($_ENV[TM_FILEPATH]); // available vars
11 | $input = "open -b com.omnigroup.omnigrafflePro " . escapeshellarg($_ENV[TM_FILEPATH]); // available vars
12 |
13 | system($input)
14 | ?>
15 |
16 |
17 | fallbackInput
18 | document
19 | input
20 | selection
21 | inputFormat
22 | text
23 | keyEquivalent
24 | @r
25 | name
26 | Open in Omnigraffle
27 | outputCaret
28 | afterOutput
29 | outputFormat
30 | text
31 | outputLocation
32 | discard
33 | scope
34 | source.dot
35 | semanticClass
36 | process.external.run.dot
37 | uuid
38 | 559EB4E6-017D-4AC3-9B44-C4657906E7A4
39 | version
40 | 2
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Commands/Generate Graph.tmCommand:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | nop
7 | command
8 | #!/usr/bin/env bash
9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
10 |
11 | . "${TM_SUPPORT_PATH}/lib/html.sh"
12 | . "${TM_SUPPORT_PATH}/lib/webpreview.sh"
13 |
14 | # Prepare output window.
15 | html_header 'Generate Graph' "$FILE"
16 | SRC=${TM_FILENAME:-untitled.dot}
17 | DST="${TMPDIR:-/tmp}/dot_${SRC%.*}.pdf"
18 | ERR="${TMPDIR:-/tmp}/dot_errors"
19 |
20 | # Compile.
21 | if "${TM_DOT:-dot}" -Tpdf -o "$DST" /dev/stdin &>"$ERR"; then
22 | echo "<meta http-equiv='refresh' content='0; file://$DST'>"
23 | else
24 | pre <"$ERR"
25 | fi
26 | rm -f "$ERR"
27 | html_footer
28 |
29 | input
30 | document
31 | inputFormat
32 | text
33 | keyEquivalent
34 | @r
35 | name
36 | Generate PDF Using dot Command
37 | outputCaret
38 | afterOutput
39 | outputFormat
40 | html
41 | outputLocation
42 | newWindow
43 | requiredCommands
44 |
45 |
46 | command
47 | dot
48 | locations
49 |
50 | /opt/local/bin/dot
51 | /usr/local/bin/dot
52 |
53 | variable
54 | TM_DOT
55 |
56 |
57 | scope
58 | source.dot
59 | semanticClass
60 | process.run.script.dot
61 | uuid
62 | 726F7253-079F-49E1-A9DF-739BBFFB321D
63 | version
64 | 2
65 |
66 |
67 |
--------------------------------------------------------------------------------
/info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | contactEmailRot13
6 | gbefgra.orpxre@tznvy.pbz
7 | contactName
8 | Torsten Becker
9 | description
10 | Graph visualization software, <a href="http://www.graphviz.org/">more info</a>.
11 | mainMenu
12 |
13 | items
14 |
15 | 726F7253-079F-49E1-A9DF-739BBFFB321D
16 | ------------------------------------
17 | 759C50D4-E121-4147-9506-760096D4A92B
18 | 559EB4E6-017D-4AC3-9B44-C4657906E7A4
19 | ------------------------------------
20 | AD2AB606-D634-4DFD-9BDA-A53CD235E1C4
21 | F6F05C35-A450-4611-AE4F-E03E40E990EB
22 | B7D66242-840C-473F-8546-33D6947AEFA7
23 | C903C77B-C726-47E1-8FB2-9F90DFE6B763
24 | F1E71422-DE57-48AF-A95A-8C30632299C2
25 | 612DF1E1-034E-4925-8E78-3EE2E2EDDA90
26 | CC54EBCC-8BE6-4105-931B-999242396406
27 | 5A1C3792-81BA-413D-AB43-9DED29F22E18
28 | 351180F5-0F3D-4486-A04E-0788FD7C4803
29 | ------------------------------------
30 | D8486A54-3F2A-490B-BF93-E6881BFA5DA9
31 |
32 | submenus
33 |
34 |
35 | name
36 | Graphviz
37 | ordering
38 |
39 | 1A53D54E-6B1D-11D9-A006-000D93589AF6
40 | 10700B07-E666-40AF-BB93-A9FA60DE0904
41 | AD2AB606-D634-4DFD-9BDA-A53CD235E1C4
42 | F6F05C35-A450-4611-AE4F-E03E40E990EB
43 | C903C77B-C726-47E1-8FB2-9F90DFE6B763
44 | B7D66242-840C-473F-8546-33D6947AEFA7
45 | D8486A54-3F2A-490B-BF93-E6881BFA5DA9
46 | F1E71422-DE57-48AF-A95A-8C30632299C2
47 | CC54EBCC-8BE6-4105-931B-999242396406
48 | 5A1C3792-81BA-413D-AB43-9DED29F22E18
49 | 351180F5-0F3D-4486-A04E-0788FD7C4803
50 | 612DF1E1-034E-4925-8E78-3EE2E2EDDA90
51 | 559EB4E6-017D-4AC3-9B44-C4657906E7A4
52 | 759C50D4-E121-4147-9506-760096D4A92B
53 | 726F7253-079F-49E1-A9DF-739BBFFB321D
54 |
55 | uuid
56 | 344D1644-6B21-11D9-B355-000D93589AF6
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Syntaxes/DOT.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fileTypes
6 |
7 | dot
8 | DOT
9 |
10 | firstLineMatch
11 | digraph.*
12 | keyEquivalent
13 | ^~G
14 | name
15 | Graphviz (DOT)
16 | patterns
17 |
18 |
19 | captures
20 |
21 | 1
22 |
23 | name
24 | storage.type.dot
25 |
26 | 2
27 |
28 | name
29 | variable.other.dot
30 |
31 | 4
32 |
33 | name
34 | punctuation.section.dot
35 |
36 |
37 | comment
38 | named digraph declaration: "digraph NAME {"
39 | match
40 | ?(digraph)[ \t]+([A-Za-z0-9]+) ?(\{)
41 |
42 |
43 | comment
44 | edge definition: <- -> --
45 | match
46 | (<|-)(>|-)
47 | name
48 | keyword.operator.dot
49 |
50 |
51 | match
52 | \b(node|edge|graph|digraph|subgraph|strict)\b
53 | name
54 | storage.type.dot
55 |
56 |
57 | match
58 | \b(bottomlabel|color|comment|distortion|fillcolor|fixedsize|fontcolor|fontname|fontsize|group|height|label|layer|orientation|peripheries|regular|shape|shapefile|sides|skew|style|toplabel|URL|width|z)\b
59 | name
60 | support.constant.attribute.node.dot
61 |
62 |
63 | match
64 | \b(arrowhead|arrowsize|arrowtail|color|comment|constraint|decorate|dir|fontcolor|fontname|fontsize|headlabel|headport|headURL|label|labelangle|labeldistance|labelfloat|labelcolor|labelfontname|labelfontsize|layer|lhead|ltail|minlen|samehead|sametail|splines|style|taillabel|tailport|tailURL|weight)\b
65 | name
66 | support.constant.attribute.edge.dot
67 |
68 |
69 | match
70 | \b(bgcolor|center|clusterrank|color|comment|compound|concentrate|fillcolor|fontname|fontpath|fontsize|label|labeljust|labelloc|layers|margin|mclimit|nodesep|nslimit|nslimit1|ordering|orientation|page|pagedir|quantum|rank|rankdir|ranksep|ratio|remincross|rotate|samplepoints|searchsize|size|style|URL)\b
71 | name
72 | support.constant.attribute.graph.dot
73 |
74 |
75 | match
76 | \b(box|polygon|ellipse|circle|point|egg|triangle|plaintext|diamond|trapezium|parallelogram|house|pentagon|hexagon|septagon|octagon|doublecircle|doubleoctagon|tripleoctagon|invtriangle|invtrapezium|invhouse|Mdiamond|Msquare|Mcircle|rect|rectangle|none|note|tab|folder|box3d|component|max|min|same)\b
77 | name
78 | variable.other.dot
79 |
80 |
81 | begin
82 | "
83 | beginCaptures
84 |
85 | 0
86 |
87 | name
88 | punctuation.definition.string.begin.dot
89 |
90 |
91 | end
92 | "
93 | endCaptures
94 |
95 | 0
96 |
97 | name
98 | punctuation.definition.string.end.dot
99 |
100 |
101 | name
102 | string.quoted.double.dot
103 | patterns
104 |
105 |
106 | match
107 | \\.
108 | name
109 | constant.character.escape.dot
110 |
111 |
112 |
113 |
114 | begin
115 | (^[ \t]+)?(?=//)
116 | beginCaptures
117 |
118 | 1
119 |
120 | name
121 | punctuation.whitespace.comment.leading.dot
122 |
123 |
124 | end
125 | (?!\G)
126 | patterns
127 |
128 |
129 | begin
130 | //
131 | beginCaptures
132 |
133 | 0
134 |
135 | name
136 | punctuation.definition.comment.dot
137 |
138 |
139 | end
140 | \n
141 | name
142 | comment.line.double-slash.dot
143 |
144 |
145 |
146 |
147 | begin
148 | (^[ \t]+)?(?=#)
149 | beginCaptures
150 |
151 | 1
152 |
153 | name
154 | punctuation.whitespace.comment.leading.dot
155 |
156 |
157 | end
158 | (?!\G)
159 | patterns
160 |
161 |
162 | begin
163 | #
164 | beginCaptures
165 |
166 | 0
167 |
168 | name
169 | punctuation.definition.comment.dot
170 |
171 |
172 | end
173 | \n
174 | name
175 | comment.line.number-sign.dot
176 |
177 |
178 |
179 |
180 | begin
181 | /\*
182 | captures
183 |
184 | 0
185 |
186 | name
187 | punctuation.definition.comment.dot
188 |
189 |
190 | end
191 | \*/
192 | name
193 | comment.block.dot
194 |
195 |
196 | scopeName
197 | source.dot
198 | uuid
199 | 1A53D54E-6B1D-11D9-A006-000D93589AF6
200 |
201 |
202 |
--------------------------------------------------------------------------------