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
Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8
Windows 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
Linux 0 0 0 0 0 0 0 0 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 0 1 0 0 0

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