13

Is there a way to capitalize a selection in Sublime? For example, if I have some text like word, I'd like the output to be Word.

I know that there is already an option to convert case into lower case or upper case, but those would result in word and WORD respectively. Is there a way to only capitalize the first letter?

6
  • 1
    Use menu _Edit>Convert Case>Title Case
    – sergioFC
    Jun 23, 2015 at 16:31
  • Thanks a lot! I guess I didn't realize it existed because there was no default key mapping set for the command.
    – Saad
    Jun 23, 2015 at 18:46
  • That happens many times :) You're welcome.
    – sergioFC
    Jun 23, 2015 at 18:47
  • @sergioFC Post this as an answer so it can be accepted and canonized, get some rep for yourself, too.
    – gfullam
    Jun 23, 2015 at 19:17
  • 1
    Possible duplicate of Convert selection to lowercase (or uppercase) in Sublime Text?
    – br3nt
    Jul 7, 2016 at 6:14

2 Answers 2

18

You can do it using the menu Edit>Convert Case>Title Case.

In case you want to set a keybinding the name of the associated command is title_case.

2

Add keybinding under the preferences as follows:

[
// for uppercase:
  { "keys": ["ctrl+u"], "command": "upper_case" },

// for lowercase:
  { "keys": ["ctrl+l"], "command": "lower_case" },

// for titlecase:
  { "keys": ["ctrl+t"], "command": "title_case" },
]
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.