Created
February 18, 2018 16:50
-
-
Save mangosmoothie/251d6dcdd5e4c3c1b841d5994bf58f5c to your computer and use it in GitHub Desktop.
Vim - convert kebab case to camel case (whole file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/\(-\)\(\w\)/\u\2/g | |
:%s <- every line in file | |
/ | |
\(-\) <- match group of char "-" | |
\(\w\) <- match group of any char | |
/ | |
\u\2 <- uppercase group 2 | |
/ | |
g <- globally (all occurances per line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment