Skip to content

Commit 6c2f307

Browse files
committed
Fix BibLaTeX related issues
This commit... 1. adds toggle comment and fold rules for BibLaTeX 2. removes static file extension assignment, so BibLaTeX syntax is assigned only if `use_biblatex` setting is true (as described in docs) 3. fixes order and indentation of xml tag in a snippet
1 parent 0a9219e commit 6c2f307

File tree

4 files changed

+57
-4
lines changed

4 files changed

+57
-4
lines changed

BibLaTeX - Comments.tmPreferences

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plist version="1.0">
3+
<dict>
4+
<key>scope</key>
5+
<string>text.biblatex</string>
6+
<key>settings</key>
7+
<dict>
8+
<key>shellVariables</key>
9+
<array>
10+
<dict>
11+
<key>name</key>
12+
<string>TM_COMMENT_START</string>
13+
<key>value</key>
14+
<string>% </string>
15+
</dict>
16+
</array>
17+
</dict>
18+
</dict>
19+
</plist>

BibLaTeX - Fold.tmPreferences

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plist version="1.0">
3+
<dict>
4+
<key>scope</key>
5+
<string>text.bibtex</string>
6+
<key>settings</key>
7+
<dict>
8+
<key>foldScopes</key>
9+
<array>
10+
<dict>
11+
<key>begin</key>
12+
<string>punctuation.section.braces.begin</string>
13+
<key>end</key>
14+
<string>punctuation.section.braces.end</string>
15+
<key>excludeTrailingNewlines</key>
16+
<false/>
17+
</dict>
18+
<dict>
19+
<key>begin</key>
20+
<string>punctuation.section.parens.begin</string>
21+
<key>end</key>
22+
<string>punctuation.section.parens.end</string>
23+
<key>excludeTrailingNewlines</key>
24+
<false/>
25+
</dict>
26+
<dict>
27+
<key>begin</key>
28+
<string>punctuation.definition.string.begin</string>
29+
<key>end</key>
30+
<string>punctuation.definition.string.end</string>
31+
<key>excludeTrailingNewlines</key>
32+
<false/>
33+
</dict>
34+
</array>
35+
</dict>
36+
</dict>
37+
</plist>

BibLaTeX.sublime-syntax

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
name: BibLaTeX
55
scope: text.biblatex
66

7-
file_extensions:
8-
- bib
9-
107
contexts:
118
main:
129
- include: scope:text.bibtex

snippets/biblatex/report.sublime-snippet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
}
1111
]]></content>
1212
<tabTrigger>report</tabTrigger>
13+
<scope>text.biblatex - meta.entry.braces.bibtex - meta.entry.parenthesis.bibtex - meta.entry.arguments.bibtex</scope>
1314
<description>BibLaTeX Report</description>
14-
<scope>text.biblatex - meta.entry.braces.bibtex - meta.entry.parenthesis.bibtex - meta.entry.arguments.bibtex</scope>
1515
</snippet>

0 commit comments

Comments
 (0)