on master help sign in
Add Org mode syntax, closes sharkdp#36
dfa024fBrice Waegeneire
.gitmodules+3
@@ -126,3 +126,6 @@
126[submodule "assets/syntaxes/sublime-fish"]
126[submodule "assets/syntaxes/sublime-fish"]
127 path = assets/syntaxes/sublime-fish
127 path = assets/syntaxes/sublime-fish
128 url = https://github.com/Phidica/sublime-fish.git
128 url = https://github.com/Phidica/sublime-fish.git
129+[submodule "assets/syntaxes/Org mode"]
130+ path = assets/syntaxes/Org mode
131+ url = https://github.com/jezcope/Org.tmbundle.git
assets/README.md+1
@@ -33,6 +33,7 @@ The following files have been manually modified after converting from a `.tmLang
33
33
34* `Dart.sublime-syntax` => removed `#regex.dart` include.
34* `Dart.sublime-syntax` => removed `#regex.dart` include.
35* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
35* `INI.sublime-syntax` => added `.hgrc`, `hgrc`, and `desktop` file types.
36+* `Org mode.sublime-syntax` => removed `task` file type.
36
37
37### Non-submodule additions
38### Non-submodule additions
38
39
assets/syntaxes/Org modenew file+1

Submodule changed.

assets/syntaxes/Org mode.sublime-syntaxnew file+219
@@ -0,0 +1,219 @@
1+%YAML 1.2
2+---
3+# http://www.sublimetext.com/docs/3/syntax.html
4+name: orgmode
5+file_extensions:
6+ - org
7+scope: text.orgmode
8+contexts:
9+ main:
10+ - match: |-
11+ (?x)
12+ ^(\*+) # leading stars
13+ \s*([A-Z_]{2,})? # todo keywords
14+ \s*(\[\#[A-Ca-c]\])? # priority
15+ \s*(?=\s+[A-Za-z0-9]+) # expected heading text
16+ comment: Outline headings
17+ captures:
18+ 1: punctuation.definition.heading.orgmode
19+ 2: keyword.other.todo.orgmode
20+ 3: constant.other.priority.orgmode
21+ push:
22+ - meta_scope: markup.heading.orgmode
23+ - meta_content_scope: entity.name.section.orgmode
24+ - match: (?=\s*$\n?)
25+ pop: true
26+ - include: heading-inline
27+ - match: "^-{5,}$"
28+ scope: meta.separator.orgmode
29+ - match: '^\s*([-+]|\s+\*)\s+(.*?)\s+::'
30+ captures:
31+ 1: keyword.operator.list.orgmode
32+ 2: markup.bold.definition.orgmode
33+ push:
34+ - meta_scope: meta.list.definition.orgmode
35+ - match: $
36+ pop: true
37+ - include: inline
38+ - match: '^\s*?([-+]|\s+\*|\d+[).])'
39+ captures:
40+ 1: keyword.operator.list.orgmode
41+ push:
42+ - meta_scope: meta.list.plain.orgmode
43+ - match: $
44+ pop: true
45+ - include: list-inline
46+ - match: (?i)^#\+(BEGIN_(QUOTE|VERSE|CENTER))$
47+ captures:
48+ 1: keyword.control.block.orgmode
49+ push:
50+ - meta_scope: markup.quote.orgmode
51+ - match: (?i)^#\+(END_\2)$
52+ captures:
53+ 1: keyword.control.block.orgmode
54+ pop: true
55+ - match: "^#[^+].*$"
56+ scope: comment.line.number-sign.orgmode
57+ - match: ^:(PROPERTIES):$
58+ captures:
59+ 1: keyword.control.drawer.orgmode
60+ push:
61+ - meta_scope: meta.drawer.properties.orgmode
62+ - match: ^:(END):$
63+ captures:
64+ 1: keyword.control.drawer.orgmode
65+ pop: true
66+ - include: properties
67+ - match: ^:(.+):$
68+ captures:
69+ 1: keyword.control.drawer.orgmode
70+ push:
71+ - meta_scope: meta.drawer.other.orgmode
72+ - match: ^:(END):$
73+ captures:
74+ 1: keyword.control.drawer.orgmode
75+ pop: true
76+ - match: (?i)#\+(BEGIN_LaTeX)$
77+ captures:
78+ 1: keyword.control.block.orgmode
79+ push:
80+ - meta_scope: meta.block.latex.orgmode
81+ - match: (?i)#\+(END_LaTeX)$
82+ captures:
83+ 1: keyword.control.block.orgmode
84+ pop: true
85+ - include: scope:text.tex.latex
86+ - match: (?i)#\+(BEGIN_HTML)$
87+ captures:
88+ 1: keyword.control.block.orgmode
89+ push:
90+ - meta_scope: meta.block.html.orgmode
91+ - match: (?i)#\+(END_HTML)$
92+ captures:
93+ 1: keyword.control.block.orgmode
94+ pop: true
95+ - include: scope:text.html.basic
96+ - match: (?i)#\+(BEGIN_SRC)\s+(python)\s*(.*)$
97+ captures:
98+ 1: keyword.control.block.orgmode
99+ 2: constant.other.language.orgmode
100+ 3: string.other.header-args.orgmode
101+ push:
102+ - meta_scope: meta.block.source.python.orgmode
103+ - match: (?i)#\+(END_SRC)$
104+ captures:
105+ 1: keyword.control.block.orgmode
106+ pop: true
107+ - include: scope:source.python
108+ - match: (?i)#\+(BEGIN_SRC)\s+(ruby)\s*(.*)$
109+ captures:
110+ 1: keyword.control.block.orgmode
111+ 2: constant.other.language.orgmode
112+ 3: string.other.header-args.orgmode
113+ push:
114+ - meta_scope: meta.block.source.ruby.orgmode
115+ - match: (?i)#\+(END_SRC)$
116+ captures:
117+ 1: keyword.control.block.orgmode
118+ pop: true
119+ - include: scope:source.ruby
120+ - match: (?i)#\+(BEGIN_SRC)\s+((?:emacs-)?lisp)\s*(.*)$
121+ captures:
122+ 1: keyword.control.block.orgmode
123+ 2: constant.other.language.orgmode
124+ 3: string.other.header-args.orgmode
125+ push:
126+ - meta_scope: meta.block.source.lisp.orgmode
127+ - match: (?i)#\+(END_SRC)$
128+ captures:
129+ 1: keyword.control.block.orgmode
130+ pop: true
131+ - include: scope:source.lisp
132+ - match: (?i)#\+(BEGIN_SRC)\s+(sh)\s*(.*)$
133+ captures:
134+ 1: keyword.control.block.orgmode
135+ 2: constant.other.language.orgmode
136+ 3: string.other.header-args.orgmode
137+ push:
138+ - meta_scope: meta.block.source.shell.orgmode
139+ - match: (?i)#\+(END_SRC)$
140+ captures:
141+ 1: keyword.control.block.orgmode
142+ pop: true
143+ - include: scope:source.shell
144+ - match: '(?i)#\+(BEGIN_(SRC|EXAMPLE))(?:\s+([\w-]+)?\s*(.*))?$'
145+ captures:
146+ 1: keyword.control.block.orgmode
147+ 3: constant.other.language.orgmode
148+ 4: string.other.header-args.orgmode
149+ push:
150+ - meta_scope: meta.block.source.other.orgmode
151+ - meta_content_scope: markup.raw.block.orgmode
152+ - match: (?i)#\+(END_\2)$
153+ captures:
154+ 1: keyword.control.block.orgmode
155+ pop: true
156+ - match: '#\+(OPTIONS):'
157+ captures:
158+ 1: keyword.control.pragma.orgmode
159+ push:
160+ - meta_scope: meta.pragma.options.orgmode
161+ - match: $
162+ pop: true
163+ - match: '([^\s]+):([^\s]+)'
164+ scope: meta.option.orgmode
165+ captures:
166+ 1: variable.parameter.option.orgmode
167+ 2: string.other.option.orgmode
168+ - match: '#\+(CALL):\s+[A-Za-z-]+(?:\[([^\]]*)\])?\(?'
169+ captures:
170+ 1: keyword.control.pragma.orgmode
171+ 2: string.other.header-args.orgmode
172+ push:
173+ - meta_scope: meta.pragma.call.orgmode
174+ - match: '\)?([^)]*)$'
175+ captures:
176+ 1: string.other.header-args.orgmode
177+ pop: true
178+ - match: (\w+)=
179+ scope: meta.assignment.orgmode
180+ captures:
181+ 1: variable.parameter.header-args.orgmode
182+ - match: '^#\+([a-zA-Z_-]+): ?(.*)$'
183+ scope: meta.pragma.orgmode
184+ captures:
185+ 1: keyword.control.pragma.orgmode
186+ 2: string.unquoted.pragma.orgmode
187+ - include: inline
188+ heading-inline:
189+ - match: ':([^:^\s]*)(?=:)'
190+ scope: meta.keyword.orgmode
191+ captures:
192+ 1: string.quoted.keyword.orgmode
193+ - include: inline
194+ inline:
195+ - match: '(?<=^|[.,:;\s])/[^/]+/(?=$|[.,:;\s])'
196+ scope: markup.italic.orgmode
197+ - match: '(?<=^|[.,:;\s])\*[^*]+\*(?=$|[.,:;\s])'
198+ scope: markup.bold.orgmode
199+ - match: '(?<=^|[.,:;\s])_[^_]+_(?=$|[.,:;\s])'
200+ scope: markup.underline.orgmode
201+ - match: '(?<=^|[.,:;\s])([~=]).+?\1(?=$|[.,:;\s])'
202+ scope: markup.raw.inline.orgmode
203+ - match: '\[(?:\[([^\]]*)\])?\[([^\]]*)\]\]'
204+ scope: meta.link.orgmode
205+ captures:
206+ 1: markup.underline.link.orgmode
207+ 2: string.other.link.orgmode
208+ - match: (?:http|ftp)s?:\/\/\S+
209+ scope: markup.underline.url.orgmode
210+ list-inline:
211+ - match: '\[[ -X]\]'
212+ scope: keyword.operator.checkbox.orgmode
213+ - include: inline
214+ properties:
215+ - match: '^:([A-Za-z_]+):\s(.*)$'
216+ scope: meta.property.orgmode
217+ captures:
218+ 1: keyword.control.property.orgmode
219+ 2: string.unquoted.propval.orgmode