pub enum MotionKind {
Show 92 variants
Left,
LeftWrap,
Right,
RightWrap,
Up,
Down,
LineStart,
FirstNonBlank,
LineEnd,
LastNonBlank,
ScreenLineStart,
ScreenFirstNonBlank,
ScreenLineEnd,
ScreenLastNonBlank,
ScreenMiddle,
LineMiddle,
Column,
ByteOffset,
WordForward,
BigWordForward,
WordEndForward,
BigWordEndForward,
WordBackward,
BigWordBackward,
WordEndBackward,
BigWordEndBackward,
FindForward,
FindBackward,
TillForward,
TillBackward,
RepeatCharacterSearch,
ReverseCharacterSearch,
PreviousLineFirstNonBlank,
NextLineFirstNonBlank,
CountedLineFirstNonBlank,
BufferTop,
BufferBottom,
BufferBottomEnd,
BufferPercentage,
WindowTop,
WindowMiddle,
WindowBottom,
SentenceBackward,
SentenceForward,
ParagraphBackward,
ParagraphForward,
SectionStartBackward,
SectionStartForward,
SectionEndBackward,
SectionEndForward,
MatchingPair,
MatchingPairBackward,
UnmatchedOpenBackward,
UnmatchedCloseForward,
MethodBackward,
MethodForward,
PreprocessorBackward,
PreprocessorForward,
CommentBackward,
CommentForward,
DiffChangeBackward,
DiffChangeForward,
SearchNext,
SearchPrevious,
SearchWordForward,
SearchWordBackward,
SearchPartialWordForward,
SearchPartialWordBackward,
PreviousMarkLine,
PreviousMarkExact,
NextMarkLine,
NextMarkExact,
HalfPageDown,
HalfPageUp,
PageDown,
PageUp,
ScrollLineDown,
ScrollLineUp,
CursorToWindowTop,
CursorToWindowTopFirstNonBlank,
CursorToWindowMiddle,
CursorToWindowMiddleFirstNonBlank,
CursorToWindowBottom,
CursorToWindowBottomFirstNonBlank,
NextWindowTop,
PreviousWindowBottom,
ScrollColumnLeft,
ScrollColumnRight,
ScrollHalfScreenLeft,
ScrollHalfScreenRight,
CursorToWindowLeft,
CursorToWindowRight,
}Expand description
Vim’s standalone cursor and viewport movement vocabulary.
Most variants are handled entirely by apply. Search and mark variants
are vocabulary signals for adapters because their resources intentionally
remain outside this crate; direct apply calls leave the cursor unchanged
for those variants. crate::MotionState resolves the two character-search
repetition variants to a concrete find/till motion before application.
Variants§
Left
h or Left.
LeftWrap
Backspace or Ctrl-H when 'whichwrap' permits crossing lines.
Right
l or Right.
RightWrap
Space when 'whichwrap' permits crossing lines.
Up
k, Up, or Ctrl-P.
Down
j, Down, Ctrl-J, Ctrl-N, or newline.
LineStart
0 or Home.
FirstNonBlank
^.
LineEnd
$ or End.
LastNonBlank
g_.
ScreenLineStart
g0.
ScreenFirstNonBlank
g^.
ScreenLineEnd
g$.
ScreenLastNonBlank
g<End>.
ScreenMiddle
gm.
LineMiddle
gM.
Column
|.
ByteOffset
go.
WordForward
w.
BigWordForward
W.
WordEndForward
e.
BigWordEndForward
E.
WordBackward
b.
BigWordBackward
B.
WordEndBackward
ge.
BigWordEndBackward
gE.
FindForward
f{char}.
FindBackward
F{char}.
TillForward
t{char}.
TillBackward
T{char}.
RepeatCharacterSearch
;, resolved by crate::MotionState.
ReverseCharacterSearch
,, resolved by crate::MotionState.
PreviousLineFirstNonBlank
-.
NextLineFirstNonBlank
+ or Enter.
CountedLineFirstNonBlank
_.
BufferTop
gg or Ctrl-Home.
BufferBottom
G.
BufferBottomEnd
Ctrl-End.
BufferPercentage
{count}%.
WindowTop
H.
WindowMiddle
M.
WindowBottom
L.
SentenceBackward
(.
SentenceForward
).
ParagraphBackward
{.
ParagraphForward
}.
SectionStartBackward
[[.
SectionStartForward
]].
SectionEndBackward
[].
SectionEndForward
][.
MatchingPair
% without a count.
MatchingPairBackward
g%.
UnmatchedOpenBackward
[( or [{; the delimiter is stored in Motion::target.
UnmatchedCloseForward
]) or ]}; the delimiter is stored in Motion::target.
MethodBackward
[m or [M.
MethodForward
]m or ]M.
PreprocessorBackward
[#.
PreprocessorForward
]#.
CommentBackward
[* or [/.
CommentForward
]* or ]/.
DiffChangeBackward
[c in diff text.
DiffChangeForward
]c in diff text.
SearchNext
n, applied by the caller’s retained search state.
SearchPrevious
N, applied by the caller’s retained search state.
SearchWordForward
*, applied by the caller’s retained search state.
SearchWordBackward
#, applied by the caller’s retained search state.
SearchPartialWordForward
g*, applied by the caller’s retained search state.
SearchPartialWordBackward
g#, applied by the caller’s retained search state.
PreviousMarkLine
[', applied by the caller’s resource-aware mark store.
PreviousMarkExact
[`, applied by the caller’s resource-aware mark store.
NextMarkLine
]', applied by the caller’s resource-aware mark store.
NextMarkExact
]`, applied by the caller’s resource-aware mark store.
HalfPageDown
Ctrl-D.
HalfPageUp
Ctrl-U.
PageDown
Ctrl-F or PageDown.
PageUp
Ctrl-B or PageUp.
ScrollLineDown
Ctrl-E.
ScrollLineUp
Ctrl-Y.
CursorToWindowTop
zt.
CursorToWindowTopFirstNonBlank
z<CR>.
CursorToWindowMiddle
zz.
CursorToWindowMiddleFirstNonBlank
z..
CursorToWindowBottom
zb.
CursorToWindowBottomFirstNonBlank
z-.
NextWindowTop
z+.
PreviousWindowBottom
z^.
ScrollColumnLeft
zh.
ScrollColumnRight
zl.
ScrollHalfScreenLeft
zH.
ScrollHalfScreenRight
zL.
CursorToWindowLeft
zs.
CursorToWindowRight
ze.