Skip to content

Instantly share code, notes, and snippets.

@duqcyxwd
Created May 19, 2013 00:08
Show Gist options
  • Save duqcyxwd/5606169 to your computer and use it in GitHub Desktop.
Save duqcyxwd/5606169 to your computer and use it in GitHub Desktop.
Sublime Snippet for ruby
<snippet>
<content><![CDATA[class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
${2:# include/extend (we'll see these later)
$0
# Constants
# Attribute macros
$3
# Other macros
# Public class methods
$4
# Public instance methods
$5
# private/protected methods }
end]]></content>
<tabTrigger>cla</tabTrigger>
<scope>source.ruby</scope>
<description>class .. end</description>
</snippet>
<?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">
<plist version="1.0">
<dict>
<key>name</key>
<string>Comments</string>
<key>scope</key>
<string>source.ruby</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string># </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_START_2</string>
<key>value</key>
<string>=begin
</string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END_2</string>
<key>value</key>
<string>
=end</string>
</dict>
</array>
</dict>
<key>uuid</key>
<string>1D26F26C-C6F7-434F-84F8-FEE895372E8A</string>
</dict>
</plist>
<snippet>
<content><![CDATA[require 'J:/CodingTools/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/autorun'
#===================================Code=============================================
$1
#==================================RSpec=============================================
$2
]]></content>
<tabTrigger>rspec</tabTrigger>
<scope>source.ruby</scope>
<description>Set up rspec for Windows</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment