Switching case in vim
Have you experienced the pain of holding the shift button for too long while coding ? You end up with something like this findByusername. In vim you can convert the word to a specific case or toggle the case.
# select the word
viw
# convert all letters to lowercase
gu #=> find_by_username
# convert all letters to uppercase
gU #=> FIND_BY_USERNAME
# toggle case
g~ #=> FIND_bY_USERNAME
Written by Jearvon Dharrie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#