What is the most convenient way to do search and replace for same words in multiple formats. I often find myself doing tons of regular expressions as follows.


The vim-abolish plug-in has a :Subvert command that does something very close to what you want.

This command covers 5 of the 7 cases you mentioned:


It doesn't seem to cover the cases with a delimiter and mixed case, in specific Scuba_diver and Scuba-diver, presumably because it will try to define the most common capitalizations you'd encounter in coding conventions (camel case, snake case, etc.) Maybe there's a way to get it to cover all these exact cases, but it wasn't immediately apparent to me how to do so (digging further might uncover it.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.