Given a string like CamelCaseMot{caret}ion, and the text caret is at the position marker {caret}, then vi\w, vi\e and vi\b all have the same effect and select the Motion "word". But if I use vi\ge, then I get seM selected - CamelCa{selstart}seM{selend}otion.
I don't know what the behaviour of vi\ge should be. The difference between the other inner motion actions only seems to be obvious with snake or kebab case, or at the end of an identifier.
vi\w will include trailing underscores, or the trailing space at the end of an identifier.
vi\e doesn't include any trailing characters, matching only to the end of the current word.
vi\b selects to the start of the current word segment or the start of the identifier if on the first word segment, not including trailing spaces.
So it seems that vi\ge should mirror vi\w behaviour and select the current word and any leading spaces/underscores/separators, up to but not including the end of the previous word segment.
Is this right? It appears to match what \ge is doing - selecting leading spaces/separators. So it would seem that it should do \geve. Or, depending on the direction of the selection range, ev\ge (but then that would imply that vi\b should actually be evb).
I think it would make sense that it would select the leading separators between words. If there were no separators, then would the selection be empty? I think that would be consistent but perhaps surprising.
Given a string like
CamelCaseMot{caret}ion
, and the text caret is at the position marker{caret}
, thenvi\w
,vi\e
andvi\b
all have the same effect and select theMotion
"word". But if I usevi\ge
, then I getseM
selected -CamelCa{selstart}seM{selend}otion
.I don't know what the behaviour of
vi\ge
should be. The difference between the other inner motion actions only seems to be obvious with snake or kebab case, or at the end of an identifier.vi\w
will include trailing underscores, or the trailing space at the end of an identifier.vi\e
doesn't include any trailing characters, matching only to the end of the current word.vi\b
selects to the start of the current word segment or the start of the identifier if on the first word segment, not including trailing spaces.So it seems that
vi\ge
should mirrorvi\w
behaviour and select the current word and any leading spaces/underscores/separators, up to but not including the end of the previous word segment.Is this right? It appears to match what
\ge
is doing - selecting leading spaces/separators. So it would seem that it should do\ge
v
e
. Or, depending on the direction of the selection range,e
v
\ge
(but then that would imply thatvi\b
should actually bee
v
b
).What should
vi\ge
do?