Sublime Forum

Capitalize first letter of completion after punctuation (Solved-ish with workaround)

#1

Hello!

I have made a good amount of completions of unfinished sentences. I would like to auto-capitalize the first letter of all my completions if it follows a punctuation mark:
Trigger: FX
Completion: for example

Hello there FX --> Hello there for example
Hello there! FX --> Hello there! For example
Hello there, FX --> Hello there, for example
Hello there. FX --> Hello there. For example

I know I can make two completions, one with the first letter capitalized, the other without capitalization, but I don’t want to have different triggers for the same sentence.

Current workaround:
In all completions, that may need the first letter capitalized, I make the first field the first letter, and then another tab at the end of the sentence:

{ "trigger": "fx", "contents": "${1:F}or example $0" },

0 Likes

#2

I would also accept a keybind solution, that edited the first letter after the last punctuation make (or ! : ?):
Trigger: FX
Completion: for example
Change first letter after punctuation to capital: ctrl+shift+space

Hello there! FX --> Hello there! for example {ctrl+shift+space} --> Hello there! For example

0 Likes