I have several strings selected in a file in Sublime Text and I want to convert them all to lowercase.
How can I convert them all to lowercase in Sublime Text?
To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.
An array of char type s[100] is declared which will store the entered string by user. Then, for loop is used to convert the string into upper case string and if block is used to check that if characters are in lower case then, convert them in upper case by subtracting 32 from their ASCII value.
In Word and Outlook for Windows hold SHIFT + F3 (tap to cycle) until the case you want is applied (if you have a laptop you may also need to hold the FN key). In Word for Mac press fn+ SHIFT + F3 until the style you want is applied.
From the Sublime Text docs for Windows/Linux:
Keypress Command Ctrl + K, Ctrl + U Transform to Uppercase Ctrl + K, Ctrl + L Transform to Lowercase
and for Mac:
Keypress Command cmd + KU Transform to Uppercase cmd + KL Transform to Lowercase
Also note that Ctrl + Shift + p in Windows (⌘ + Shift + p in a Mac) brings up the Command Palette where you can search for these and other commands. It looks like this:
For Windows:
Method 1 (Two keys pressed at a time)
Method 2 (3 keys pressed at a time)
Please note: If you press and hold Ctrl+K for more than two seconds it will start deleting text so try to be quick with it.
I use the above shortcuts, and they work on my Windows system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With