Permalink
Browse files

Add parfor/endparfor keyword

Based on a patch from @cerveza1988
  • Loading branch information...
schoeps authored and infininight committed Aug 2, 2013
1 parent 26afe3e commit 585267fb5c2ff66a205b43e14fb0db1cc421025c
@@ -9,7 +9,7 @@
<key>settings</key>
<dict>
<key>foldingStartMarker</key>
- <string>^\s*(function|if|switch|while|for|try)\b(?!.*\bend\b).*$</string>
+ <string>^\s*(function|if|switch|while|for|parfor|try)\b(?!.*\bend\b).*$</string>
<key>foldingStopMarker</key>
<string>^\s*(end|return)\b.*$</string>
</dict>
@@ -9,9 +9,9 @@
<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>
+ <string>^\s*(function|if|switch|while|for|parfor|try)\b(?!.*\b(end|endfunction|endif|endswitch|endwhile|endfor|endparfor|endtry)\b).*$</string>
<key>foldingStopMarker</key>
- <string>^\s*(end|return|endfunction|endif|endswitch|endwhile|endfor|endtry)\b.*$</string>
+ <string>^\s*(end|return|endfunction|endif|endswitch|endwhile|endfor|endparfor|endtry)\b.*$</string>
</dict>
<key>uuid</key>
<string>D861F822-4411-4330-8E9E-E9FCCF9C7449</string>
@@ -35,8 +35,8 @@
function
|if|else|elseif
|switch|case|otherwise
- |for|while
- |try|catch
+ |for|parfor|while
+ |try|catch
|unwind_protect
)\b</string>
<key>shellVariables</key>
@@ -9,7 +9,7 @@
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
- <string>^\s*(catch|else|elseif|end|endfunction|endif|endswitch|endwhile|endfor|endtry)\b</string>
+ <string>^\s*(catch|else|elseif|end|endfunction|endif|endswitch|endwhile|endfor|endparfor|endtry)\b</string>
<key>highlightPairs</key>
<array>
<array>
@@ -30,7 +30,7 @@
</array>
</array>
<key>increaseIndentPattern</key>
- <string>^\s*(catch|else|elseif|for|function|if|switch|while|try).*</string>
+ <string>^\s*(catch|else|elseif|for|parfor|function|if|switch|while|try).*</string>
<key>shellVariables</key>
<array>
<dict>
@@ -51,7 +51,7 @@ def get_variables
line.strip!
# Strip out all core keywords
- line.gsub!(/^\s*(function|if|switch|while|for|try)\s+/,'')
+ line.gsub!(/^\s*(function|if|switch|while|for|parfor|try)\s+/,'')
# Strip out all cells
while line =~ /[\{\}]/
View
@@ -655,7 +655,7 @@
<key>comment</key>
<string>Control keywords</string>
<key>match</key>
- <string>(?&lt;!\.)\b(break|case|catch|continue|else|elseif|end|for|if|otherwise|pause|rethrow|return|start|startat|stop|switch|try|wait|while)\b</string>
+ <string>(?&lt;!\.)\b(break|case|catch|continue|else|elseif|end|for|parfor|if|otherwise|pause|rethrow|return|start|startat|stop|switch|try|wait|while)\b</string>
<key>name</key>
<string>keyword.control.matlab</string>
</dict>
@@ -498,7 +498,7 @@
<key>comment</key>
<string>Control keywords</string>
<key>match</key>
- <string>(?&lt;!\.)\b(all_va_args|break|case|catch|continue|else|end|for|elseif|end_try_catch|end_unwind_protect|endfor|endfunction|endif|endwhile|global|gplot|gsplot|if|otherwise|persistent|replot|return|static|start|startat|stop|switch|try|until|unwind_protect|unwind_protect_cleanup|varargin|varargout|wait|while)\b</string>
+ <string>(?&lt;!\.)\b(all_va_args|break|case|catch|continue|else|end|for|parfor|elseif|end_try_catch|end_unwind_protect|endfor|endparfor|endfunction|endif|endwhile|global|gplot|gsplot|if|otherwise|persistent|replot|return|static|start|startat|stop|switch|try|until|unwind_protect|unwind_protect_cleanup|varargin|varargout|wait|while)\b</string>
<key>name</key>
<string>keyword.control.octave</string>
</dict>

0 comments on commit 585267f

Please sign in to comment.