Skip to content

Instantly share code, notes, and snippets.

@mangosmoothie
Created February 18, 2018 16:50
Show Gist options
  • Save mangosmoothie/251d6dcdd5e4c3c1b841d5994bf58f5c to your computer and use it in GitHub Desktop.
Save mangosmoothie/251d6dcdd5e4c3c1b841d5994bf58f5c to your computer and use it in GitHub Desktop.
Vim - convert kebab case to camel case (whole file)
:%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