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

snake_case

by vbali ST2

Converts the selected text to a lower case, snake_case representation without accents in Sublime Text 2

Details

  • 2014.04.23.18.07.47
  • github.​com
  • github.​com
  • 11 years ago
  • 4 weeks ago
  • 13 years ago

Installs

  • Total 487
  • Win 151
  • Mac 229
  • Linux 107
Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29
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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
Linux 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

Readme

Source
raw.​githubusercontent.​com

snake_case for Sublime Text 2

Converts the source text with accents and non-word characters into a lowercase, “source code friendy” snake_case representation.

Examples

Lorem ipsum dolor sit amet -> lorem_ipsum_dolor_sit_amet
Árvíztűrő tükörfúrógép -> arvizturo_tukorfurogep

I's useful to create proper labels within in Ruby on Rails fixtures.

RoR fixture example:

fullname: John Appleseed
username: john

Copy the John Appleseed text and paste it above the fullname line. Select the text and press Ctrl+Shift+- or select Edit/Convert Case/snake_case:

john_appleseed:
  fullname: John Appleseed
  username: john