1

I usually have variables/function names like:

loginUser()
registerUser()
saveUserData()
checkBaggageTag()

So, as you see, some of them repeat the User word, and so when I copy paste and need to rename one of them, I do it this way: loginUser() I'll do cw and write registerUser.

Here is the question, is there a way to do cw but only change the word up to the first Uppercase letter? (U in User for example) so I can avoid retyping the word User? Of course, I can always do vtUc and then type register but you know, that's 4 keys...is there a way to it in fewer?

Thanks for your help ^_^

FORGISDELUXE
  • 103
  • 1
  • 6
  • Forget about counting keystrokes. Whatever nifty saving you may come up with will ultimately be nullified by the amount of keystrokes in your questions, the amount of times you refreshed the page to see if there is a new answer, or a million little things. – romainl Apr 15 '21 at 10:42

2 Answers2

2

There are definitely fancy plugins for this (smth. about "motion" and "case"). But on most occasions, IMO, one is able to count, e.g. 5s or 8s etc.

Matt
  • 13,674
  • 1
  • 18
  • 27
2

Using command t: ctU (change till the next U).

Using search: c/UEnter

Searching to the next upper-case latin letter (not only U): c/\uEnter

phd
  • 82,685
  • 13
  • 120
  • 165