Camelcasemotion is a Vim script that facilitates motion through CamelCaseWords and underscore_notation via key mappings.
Using the new motions ',w', ',b' and ',e', navigating word boundaries and uppercase letters is seamless. The motions also work on underscore notation, where words are delimited by the underscore character.
These new motions can be used in normal mode, operator-pending mode, and visual mode, making changing identifiers easier. For example, to change 'Camel' to something else in 'CamelCase', type 'bc,w'.
To provide an example, given the following CamelCase identifiers in a source code fragment and corresponding identifiers in underscore_notation, ',w' moves the cursor to each word boundary and uppercase letter: set, Script, 31337, Path, And, Name, Without, Extension, 11, dpn0. Similarly, ',b' and ',e' move the cursor backward and to the end, respectively.
There is one limitation to CamelCaseMotion - operator-pending and visual mode motions are limited to a maximum [count] of 9. The script requires Vim and can be installed by placing it into your user or system VIM plugin directory.
Configuration is simple - if you want to use different mappings, map your keys to the appropriate targets before sourcing the script. For example, you can replace the default 'w', 'b' and 'e' mappings using 'map w CamelCaseMotion_w, map b CamelCaseMotion_b, map e CamelCaseMotion_e' in your .vimrc file.
Version 1.30.013: N/A