Vim replace operation to convert snake_case to camelCase (credits @Sean C.):
%s/_\([a-zA-Z]\)/\u\1/g
Automatically refactor a script's symbol names from snake_case to camelCase.
- Press ESC to ensure you're in command mode.
- Press :.
- Type
%s/_\([a-zA-Z]\)/\u\1/g
. - Press ENTER.
To save the changes, type :, then wq
and ENTER.