I want to define my text fold and unfold rules in the following figure. However, I can not figure it out. I am not familiar with sublime-syntax, please give me some advices, thanks.
The related link:
The text used in figure:
anything
anything
"""
anything
anything
+++ fold.begin
def anything():
pass
def anything():
pass
--- fold.end
"""
anything
anything
The sublime-syntax:
push_pop_triplequote:
- meta_scope: geryPushPop
- match: '\"\"\"$'
scope: geryColorGray
pop: true
- match: (\+\+\+)
captures:
1: fold.begin
- match: (---)
captures:
1: fold.end
The tmPreferences:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>text.txtgg</string>
<key>settings</key>
<dict>
<key>scopeFoldingEnabled</key>
<true/>
<key>foldScopes</key>
<array>
<dict>
<key>begin</key>
<string>fold.begin</string>
<key>end</key>
<string>fold.end</string>
<key>excludeTrailingNewlines</key>
<true/>
</dict>
</array>
</dict>
</dict>
</plist>
The pywith example:
#+ fold.begin
def anything():
pass
#- fold.end
# --------------------------------
#+ fold.begin
def anything():
pass
#- fold.end
# --------------------------------