Most programming languages use CamelCase
("anIdentifier") naming conventions
for identifiers. With Evil, you could navigate inside those identifiers using Evil
built-in motions is the [count]f{char}
motion, i.e. f{uppercase-char}
or f_,
respectively. But I would like to have this easier. I noticed there are many plugins available for Vim, which enables you to move camelCase-wise.
These packages defines motions ,w ,b and ,e (similar to w b e), which do not move word-wise (forward/backward), but Camel-wise; i.e. to word boundaries and uppercase letters. Outside of "words" (e.g. in non-keyword characters like // or ;), the new motions move just like the regular motions.
For example, with the CamelCase plugin the cursor ([]
) is on the following sentence:
[]AnotherExampleOfFoobar
When I type dw, it will change to the following:
[]ExampleOfFoobar.
When I googled around for an alternative package for Evil, I found no alternative package for CamelCase motion. It deletes the whole AnotherExampleOfFoobar
, instead deleting Another
.
So I guess there is a missing feature, that I need to implement it in some way. So have anyone any suggestion to start with it?
subword-mode
.evil-little-word
package, it seems it adds new commands next to the existing Evil commands. It adds a layer of complexitiy to Evil, which I don't want. The CamelCase plugin in Vim works with the default Vim commands. It stops on subwords, I would prefer that, instead adding new commands fromevil-little-word
next to the default Evil commands. Any suggestion?w
toevil-forward-little-word-end
andiw
toevil-inner-little-word
? I'm not sure about how to rebind evil keybindings, but it seems like a promising approach...