The answer is for Title case but the OP asked for sentence case for what I can gather.
Here's the regex for all cases π€¦ββοΈ
In sublime press Ctrl+H to bring up the replace dialog and click the regex button.
In the find box use: (^|\.\s+|β¦\s|\t)([a-z])
In the replace box use: \L\1\U\2
Additionally, you can use a plugin called RegReplace found here: https://packagecontrol.io/packages/regreplace so that you can add this to a menu, command or context menu.
I've added all the basic case examples here just to show how to nest the RegReplace items in a sub-menu for your context click menu.
Once installed go to: Perferences>Package Settings>RegReplace>Rules - User and paste the following.
{
"format": "3.0",
"replacements": {
"case_lower":
{
"find": "(.+)",
"replace": "\\L\\1",
"greedy": true,
},
"case_sentence":
{
"find": "(^|\\.\\s+|β¦\\s|\\t)([a-z])",
"replace": "\\L\\1\\C\\2",
"greedy": true
},
"case_title":
{
"find": "\\b(\\w)(\\w+)",
"replace": "\\C\\1\\L\\2",
"greedy": true,
},
"case_upper":
{
"find": "(.+)",
"replace": "\\C\\1",
"greedy": true,
}
}
}
Then go to the menu again and go to: Perferences>Package Settings>RegReplace>Settings and paste the following in the user file that'll appear on the right panel.
{
"selection_only": true, // Optional but I prefer to only replace the selection.
"extended_back_references": true // true allows the \l\1 to return the text to lowercase or others.
}
And set up this as a menu go to the file: ...\User\Context.sublime-menu and paste this:
[
{"caption" : "-"},
// https://packagecontrol.io/packages/regreplace
{
"caption": "Reg Replace",
"children":
[
{ "caption": "Convert Case: Lower", "command": "reg_replace", "args": {"replacements": ["case_lower"]} },
{ "caption": "Convert Case: Sentence", "command": "reg_replace", "args": {"replacements": ["case_sentence"]} },
{ "caption": "Convert Case: Title", "command": "reg_replace", "args": {"replacements": ["case_title"]} },
{ "caption": "Convert Case: Upper", "command": "reg_replace", "args": {"replacements": ["case_upper"]} }
]
}
]
More RegReplace examples can be found here: Perferences>Package Settings>RegReplace>Rules - Example.
Here's my context-menu
{ "keys": ["super+k", "super+t"], "command": "title_case" }
β Apriorism