diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2022-08-24 01:26:08 -0600 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2022-08-24 01:26:08 -0600 |
commit | 0d83f507cef5f59d4b8afeed9633978394f2331a (patch) | |
tree | dd586ecd98dcfc16327d95ed1efc41b3f0796126 /autoload/hints | |
parent | eabc175e8d7649f0d3308e8bec57f876107b8335 (diff) | |
download | fieldmarshal.vim-0d83f507cef5f59d4b8afeed9633978394f2331a.tar.gz fieldmarshal.vim-0d83f507cef5f59d4b8afeed9633978394f2331a.tar.bz2 fieldmarshal.vim-0d83f507cef5f59d4b8afeed9633978394f2331a.zip |
Implement subwords.vim
This plugin adds support for motions and text object based around
subwords. A "subword" is a constituent word of a larger "metaword"
in some case format. For examle "camel" is a "subword" of the "metaword"
"camelCase" or "camel_case".
The text objects added are
* `i-` the inner subword. For this would match something like
"[camel]_case" or "[camel]Case"
* `a-` around the subword. This distinction only matters for snake_case,
where the match would be "[camel_]case". For camelCase, this is the
same as `i-`.
* `i_`/`a_` like the above, but interpret ambiguous metawords as
snake_case. For example, the metaword ThisIs_AnExample is ambiguous
because it's both snake_case and camelCase. `i-`/`a-` interpet it as
camelCase, but `i_`/`a_` interpet it as snake_case.
ThisIs_AnExample
^
i- === [This]Is_AnExample
a- === [This]Is_AnExample
i_ === [ThisIs]_AnExample
a_ === [ThisIs_]AnExample
The motions added are
* `M--` (Meta + hyphen) Move forward one subword
* `M-_` (Meta + underscore) Move backward one subword.
Diffstat (limited to 'autoload/hints')
0 files changed, 0 insertions, 0 deletions