Skip to Content

Sublime Text Package of the Day: Case Conversion

I recently blogged about AnyEdit Tools - a plugin for Eclipse that among other things can transform text with underscores to camel case.

Since I’ve been using Sublime I’ve missed that functionality until I stumbled upon CaseConversion.

Convert between snake_case, camelCase, and PascalCase in Sublime Text 2

Look at the key bindings for your particular OS, on Windows CTRL+ALT+C, CTRL+ALT+C does the trick from my_var_uses_underscores to myVarUsesUnderscores.

Nice!

What’s really nice is that it supports Sublimes multi-select.

So if you have

this_is_something
this_is_something
this_is_something

You can select the first instance of ’this_is_something’, hit CTRL+D to select the other two, then hit CTRL+ALT+C, CTRL+ALT+C to convert all three:

thisIsSomething
thisIsSomething
thisIsSomething

Super nice!

On a related note, I’ve also blogged about using AnyEdit Tools for sorting. Sublime has this capability baked in!

committeeName = "";
displayStipulator = true;
approvalDate = "";
notesToPi = "";
findings = "";

Select the list, hit F9 and wham:

approvalDate = "";
committeeName = "";
displayStipulator = true;
findings = "";
internalNotes = "";
notesToPi = "";