Awesome
Productive Sublime Snippets for Ruby
Style
- Only Ruby snippets
- Focus on Ruby core and common standard snippets
- No gem specific snippets, except for stdlib, bundler and rake
Install
- Search in Sublime's package control for "ProductiveSnippetsRuby" OR
- Clone into a directory in your Sublime Text Packages folder
- Delete interfering Ruby snippets
Included snippets
- See CHEATSHEET.md
Custom Shortcuts / Wrap around Selection
You can map keys to insert a specific snippet. This makes especially sense for snippets that can be wrapped around the current selection. A good example would be wrapping the selection in a Begin / Rescue statement. To do so when ALT+SHIFT+R is pressed, add this to your keymap file:
{
"keys" : ["alt+shift+r"],
"command" : "insert_snippet",
"args": {
"name": "Packages/ProductiveSnippetsRuby/begin.sublime-snippet"
}
}
All snippets that can be wraped arround the selection have a [X] in their description. This allows you to define a key mapping, that shows all snippets that you can wrap arround the current selection:
{
"keys": ["alt+shift+w"],
"command": "show_overlay",
"args": {
"overlay": "command_palette",
"text": "Snippet: [X]"
}
}
Also See
J-_-L
MIT