Permalink
Browse files

Move folding settings.

  • Loading branch information...
1 parent 9f57c00 commit c49ca766b1a8efb9e14d2016731adc3af076d6c0 @infininight infininight committed Nov 14, 2011
View
19 Preferences/Folding - M.tmPreferences
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Folding (M)</string>
+ <key>scope</key>
+ <string>source.matlab</string>
+ <key>settings</key>
+ <dict>
+ <key>foldingStartMarker</key>
+ <string>^\s*(function|if|switch|while|for|try)\b(?!.*\bend\b).*$</string>
+ <key>foldingStopMarker</key>
+ <string>^\s*(end|return)\b.*$</string>
+ </dict>
+ <key>uuid</key>
+ <string>75D71264-922A-440B-A0DC-CC865C2DC1D3</string>
+</dict>
+</plist>
View
19 Preferences/Folding - Octave.tmPreferences
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Folding (Octave)</string>
+ <key>scope</key>
+ <string>source.octave</string>
+ <key>settings</key>
+ <dict>
+ <key>foldingStartMarker</key>
+ <string>^\s*(function|if|switch|while|for|try)\b(?!.*\b(end|endfunction|endif|endswitch|endwhile|endfor|endtry)\b).*$</string>
+ <key>foldingStopMarker</key>
+ <string>^\s*(end|return|endfunction|endif|endswitch|endwhile|endfor|endtry)\b.*$</string>
+ </dict>
+ <key>uuid</key>
+ <string>D861F822-4411-4330-8E9E-E9FCCF9C7449</string>
+</dict>
+</plist>
View
4 Syntaxes/M.plist → Syntaxes/M.tmLanguage
@@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>foldingStartMarker</key>
- <string>^\s*(function|if|switch|while|for|try)\b(?!.*\bend\b).*$</string>
- <key>foldingStopMarker</key>
- <string>^\s*(end|return)\b.*$</string>
<key>keyEquivalent</key>
<string>^~M</string>
<key>name</key>
View
4 Syntaxes/Octave.tmLanguage
@@ -4,10 +4,6 @@
<dict>
<key>fileTypes</key>
<array/>
- <key>foldingStartMarker</key>
- <string>^\s*(function|if|switch|while|for|try)\b(?!.*\b(end|endfunction|endif|endswitch|endwhile|endfor|endtry)\b).*$</string>
- <key>foldingStopMarker</key>
- <string>^\s*(end|return|endfunction|endif|endswitch|endwhile|endfor|endtry)\b.*$</string>
<key>keyEquivalent</key>
<string>^~O</string>
<key>name</key>

3 comments on commit c49ca76

@mmattar

(Disclaimer: Bundles novice)

I noticed that I did not have the option to fold code in Matlab anymore. Looking at the Bundle editor, I noticed that foldingStartMarker and foldingStopMarker were set in a "Folding" Preferences file, but not in the "Matlab" Language file (as it is in other languages such as C++). So by moving these two variables to the "Matlab" Language file, code folding worked again. I went through the commits to see which ones effected code folding and this one seems to be it. So my question is: does this commit introduce a bug or is there a way to get Textmate to see the "Folding" preferences file. Thanks.

@infininight
textmate member

This is a change we made in 2.0, if you are still using 1.x you should use the 1.x branch:

https://github.com/textmate/matlab.tmbundle/tree/textmate-1.x

@mmattar

Ah, thanks.

Please sign in to comment.