-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsf.sublime-syntax
37 lines (33 loc) · 999 Bytes
/
csf.sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: LaTeX Bibliographic Codepage and Sort Definition (CS)
comment: |
Grammer based on csfile.txt of bibtex8bit, available at https://ctan.org/tex-archive/biblio/bibtex/8-bit.
file_extensions:
- csf
scope: text.tex.cs
contexts:
prototype:
- include: comments
main:
- include: general-commands
general-commands:
- match: (\\)[A-Za-z@]+
scope: support.function.general.latex
captures:
1: punctuation.definition.backslash.latex
push:
- meta_scope: meta.environment.latex
- match: '\{'
scope: punctuation.definition.brace.begin.latex
set:
- meta_scope: meta.environment.latex meta.group.brace.latex
- match: (\-|\_)
scope: support.function.latex
- match: '\}'
scope: punctuation.definition.brace.end.latex
pop: true
comments:
- match: '%.*$\n?'
scope: comment.line.percentage.tex