Skip to content
Browse files

Merge pull request #9 from tinogomes/master

Bugfix on toggle string:symbol and highlight line over private/protected/public declarations
  • Loading branch information...
2 parents e22fae3 + 9560b8e commit fbc9b99df8225a285b79632afd67a1c9d5f62c5c @radar radar committed Dec 5, 2011
Showing with 24 additions and 17 deletions.
  1. +3 −3 Commands/Toggle String:Symbol.tmCommand
  2. +1 −1 Support/RubyMate/run_script.rb
  3. +18 −13 Syntaxes/Ruby.plist
  4. +2 −0 info.plist
View
6 Commands/Toggle String:Symbol.tmCommand
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
@@ -11,8 +11,8 @@
print case str = STDIN.read
# Handle standard quotes
- when /\A["'](\w+)["']\z/: ":" + $1
- when /\A:(\w+)\z/: '"' + $1 + '"'
+ when /\A["'](\w+)["']\z/ then ":" + $1
+ when /\A:(\w+)\z/ then '"' + $1 + '"'
# Default case
else str
end
View
2 Support/RubyMate/run_script.rb
@@ -58,7 +58,7 @@
out.join()
else
htmlize(str)
- end
+ end
when :err
"<span style=\"color: red\">#{htmlize str}</span>"
end
View
31 Syntaxes/Ruby.plist
@@ -5,7 +5,6 @@
<key>comment</key>
<string>
TODO: unresolved issues
-
text:
"p &lt;&lt; end
print me!
@@ -20,13 +19,13 @@
• Nested heredocs are not really supportable at present
text:
- print &lt;&lt;-'THERE'
- This is single quoted.
- The above used #{Time.now}
- THERE
+ print &lt;&lt;-'THERE'
+ This is single quoted.
+ The above used #{Time.now}
+ THERE
symtoms:
From Programming Ruby p306; should be a non-interpolated heredoc.
-
+
text:
"a\332a"
symptoms:
@@ -46,9 +45,7 @@
</string>
<key>fileTypes</key>
<array>
- <string>rb</string>
<string>rbx</string>
- <string>rjs</string>
<string>Rakefile</string>
<string>rake</string>
<string>sake</string>
@@ -254,12 +251,20 @@
<key>comment</key>
<string> everything being a method but having a special function is a..</string>
<key>match</key>
- <string>\b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])</string>
+ <string>\b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|module_function|private|protected|public)\b(?![?!])</string>
<key>name</key>
<string>keyword.other.special-method.ruby</string>
</dict>
<dict>
<key>comment</key>
+ <string>highlight annotation words</string>
+ <key>match</key>
+ <string>^.*?\b(private|protected|public)\b$\n</string>
+ <key>name</key>
+ <string>keyword.other.annotation.ruby</string>
+ </dict>
+ <dict>
+ <key>comment</key>
<string>keywords associated with state machine DSLs</string>
<key>match</key>
<string>\b(state_machine|event|before_transition|after_transition|transition)\b(?![?!])</string>
@@ -1611,11 +1616,11 @@
?\C-a ?\M-a ?\C-\M-\C-\M-a
examples (4th alternation = normal):
- ?a ?A ?0
- ?* ?" ?(
+ ?a ?A ?0
+ ?* ?" ?(
?. ?#
-
-
+
+
the negative lookbehind prevents against matching
p(42.tainted?)
</string>
View
2 info.plist
@@ -639,6 +639,8 @@
<string>34FEBB9F-73CD-4DD4-A0A3-1CF2A5E3DE78</string>
<string>33969819-62C5-4E03-B824-C2337205F364</string>
<string>A7BF14E6-59B1-42E5-8755-8A72BF13685E</string>
+ <string>B2C3ADE8-E19E-4B87-9C6C-593D490114C7</string>
+ <string>59E811FF-E722-46BE-8938-04713612FABB</string>
</array>
<key>uuid</key>
<string>467B298F-6227-11D9-BFB1-000D93589AF6</string>

0 comments on commit fbc9b99

Please sign in to comment.
Something went wrong with that request. Please try again.