pub enum Motion {
Show 40 variants
Left,
Right,
Up,
Down,
WordFwd,
BigWordFwd,
WordBack,
BigWordBack,
WordEnd,
BigWordEnd,
WordEndBack,
BigWordEndBack,
LineStart,
FirstNonBlank,
LineEnd,
FileTop,
FileBottom,
Find {
ch: char,
forward: bool,
till: bool,
},
FindRepeat {
reverse: bool,
},
MatchBracket,
WordAtCursor {
forward: bool,
whole_word: bool,
},
SearchNext {
reverse: bool,
},
ViewportTop,
ViewportMiddle,
ViewportBottom,
LastNonBlank,
LineMiddle,
ParagraphPrev,
ParagraphNext,
SentencePrev,
SentenceNext,
ScreenDown,
ScreenUp,
SectionBackward,
SectionForward,
SectionEndBackward,
SectionEndForward,
FirstNonBlankNextLine,
FirstNonBlankPrevLine,
FirstNonBlankLine,
}Variants§
Left
Right
Up
Down
WordFwd
BigWordFwd
WordBack
BigWordBack
WordEnd
BigWordEnd
WordEndBack
ge — backward word end.
BigWordEndBack
gE — backward WORD end.
LineStart
FirstNonBlank
LineEnd
FileTop
FileBottom
Find
FindRepeat
MatchBracket
WordAtCursor
Fields
SearchNext
n / N — repeat the last / or ? search.
ViewportTop
H — cursor to viewport top (plus count - 1 rows down).
ViewportMiddle
M — cursor to viewport middle.
ViewportBottom
L — cursor to viewport bottom (minus count - 1 rows up).
LastNonBlank
g_ — last non-blank char on the line.
LineMiddle
gM — cursor to the middle char column of the current line
(floor(chars / 2)). Vim’s variant ignoring screen wrap.
ParagraphPrev
{ — previous paragraph (preceding blank line, or top).
ParagraphNext
} — next paragraph (following blank line, or bottom).
SentencePrev
( — previous sentence boundary.
SentenceNext
) — next sentence boundary.
ScreenDown
gj — count visual rows down (one screen segment per step
under :set wrap; falls back to Down otherwise).
ScreenUp
gk — count visual rows up; mirror of Motion::ScreenDown.
SectionBackward
[[ — backward to the previous { at column 0 (C section header).
Charwise exclusive; count-aware.
SectionForward
]] — forward to the next { at column 0. Charwise exclusive.
SectionEndBackward
[] — backward to the previous } at column 0 (C section end).
Charwise exclusive; count-aware.
SectionEndForward
][ — forward to the next } at column 0. Charwise exclusive.
FirstNonBlankNextLine
+ / <CR> — first non-blank of the next line. Linewise.
FirstNonBlankPrevLine
- — first non-blank of the previous line. Linewise.
FirstNonBlankLine
_ — first non-blank of count-1 lines down (count=1 = current line). Linewise.