Convert selection to lowercase (or uppercase) in Sublime Text?
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?
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,
ctrl + KU for Uppercase
ctrl + KL for Lowercase
METHOD 1
Press ctrl and hold.
Now press K , release K while holding ctrl (do not release ctrl key)
Now press U or L ( ctrl key is still pressed) and release all keys.
OR
METHOD 2
Press ctrl and hold.
Now press K
Without releasing ctrl and K , immediately press U (or L ) And release all keys.
Please note: If you press and hold ctrl + K for more than 2 secs it will start deleting text. So try to be quick with it.
I use the above shortcuts, and it works on my Windows system.
As a bonus for setting up Title Case shortcut key ctrl+kt (while holding ctrl, press k and t), go to "Preferences" - "Keybindings-User"
If you have a blank file open and close with the square brackets:
[ { "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" } ]
Otherwise if you already have stuff in there, just make sure if it comes after another command to prepend a comma "," and add:
{ "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" }
链接地址: http://www.djcxy.com/p/62374.html
