ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Productive​Snippets​Ruby

by janlelis ALL

Ruby Snippets for Sublime Text

Labels snippets, ruby

Details

Installs

  • Total 4K
  • Win 1K
  • Mac 2K
  • Linux 1K
Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

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

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