51

I would like to convert variables from or to UpperCamelCase, lowerCamelCase, underscore_style, or even "separate by spaces". This would be useful for coding and making documentation.

I use Sublime Text 2. Can this be done in this editor?

slhck
  • 223,558
  • 70
  • 607
  • 592
Stan
  • 7,215
  • 35
  • 97
  • 142
  • 1
    Python can do that with its' str methods. Other than that, remember about product recommendations. – Doktoro Reichard Aug 23 '13 at 11:14
  • It wouldn't be that hard to do with substitution regexes (perl ?) – mveroone Aug 23 '13 at 12:29
  • 1
    Your Notepad++ solution is here, so I removed the tag from this question: [Use Notepad++ to change under_score_case to CamelCase?](http://superuser.com/questions/312073/use-notepad-to-change-under-score-case-to-camelcase) – slhck Aug 23 '13 at 12:35

1 Answers1

89

The Case Conversion plugin can do this for Sublime Text.

You can install it with Package Control. If you haven't done so, install Package Control first, then press Ctrl-Shift-P or Cmd-Shift-P, go to Package Control, Install Package, and install Case Conversion.

It adds new entries to your Convert Case menu.

slhck
  • 223,558
  • 70
  • 607
  • 592