Running sublime Text 3
Possibly the wrong place to ask, but…
There are 3 functions that I would like to have work differently from how they do. These three are ‘title_case’, ‘lower_case’, and ‘upper_case’.
I’d do it myself, but do not know where or what to change. If you point me in the right direction I’ll handle it…
Here is the way I would like these to work.
After invoking either of these commands, if character(s) after cursor is(are) whitespace, advance thru the whitespace to the first character of a word.
For ‘lower_case’, lower case the word from the beginning of the word and advance the cursor to the end of the word, as above.
For ‘upper_case’, upper case the word from the beginning of the word and advance the cursor to the end of the word, as above.
So if I have a set of words (separated by whitespace), I could place the cursor before or in the first word and press alt-u 4 times and have 4 words upper-cased.
neat.
For ‘title_case’, capitalize the first character from the position of the cursor and advance the cursor to the end of the word.
Note, do not go back to the beginning of the word, just perform the operation from the current cursor position to the end of the word.
This is the reason for starting at the cursor position and then advancing to the end of the word.
Suppose I have a variable ‘myfirSTstriNg’.
I could position the cursor between the ‘y’ and ‘f’ and do title_case. I would get
myFirststring
with the cursor at the end.
back arrow the cursor to between the ‘t’ of first and the ‘s’ of string. and do title_case again.
I get the desired result:
myFirstString
If I wanted MyFirstString, I would place the cursor before the first character and start from there.
So how can I make these changes?
Thanks,
Love Sublime Text
chuckles