Saad
Saad

Reputation: 53799

Capitalize selection in Sublime Text

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?

Upvotes: 13

Views: 7541

Answers (2)

Abhishek Pareek
Abhishek Pareek

Reputation: 158

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" },
]

Upvotes: 2

sergioFC
sergioFC

Reputation: 6016

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.

Upvotes: 18

Related Questions