Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Often I'll be doing a quick edit to a camel case word in some code and wish I could use something like text-objects to select one part of the camel case word.

For example, given this snippet:

class TextObject:

If my cursor is on the 'x' in TextObject, I would like to quickly select/operate on the word 'Text'. If my cursor is on the 'j', I would like to manipulate the word 'Object'.

Vim text-objects allow me to quickly manipulate the entire word TextObject (e.g 'caw'), but I've noticed that I quite often want to manipulate only a single word in a camel case string like this.

Any pointers?

Thanks in advance

share|improve this question
up vote 6 down vote accepted

This is exactly what the CamelCaseMotion script is for. I use it all the time.

share|improve this answer
Thanks, guess I was too hung up on there possibly being a built-in solution to think of looking for a script! – Joe Holloway Aug 20 '09 at 13:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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