#[non_exhaustive]pub enum MoveType {
Show 22 variants
BufferPos(MovePosition),
BufferByteOffset,
BufferLineOffset,
BufferLinePercent,
Column(MoveDir1D, bool),
FinalNonBlank(MoveDir1D),
FirstWord(MoveDir1D),
ItemMatch,
Line(MoveDir1D),
LineColumnOffset,
LinePercent,
LinePos(MovePosition),
WordBegin(WordStyle, MoveDir1D),
WordEnd(WordStyle, MoveDir1D),
ParagraphBegin(MoveDir1D),
SentenceBegin(MoveDir1D),
SectionBegin(MoveDir1D),
SectionEnd(MoveDir1D),
ScreenFirstWord(MoveDir1D),
ScreenLine(MoveDir1D),
ScreenLinePos(MovePosition),
ViewportPos(MovePosition),
}Expand description
Specify a movement away from the current cursor position.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BufferPos(MovePosition)
Move to a line at a position relative to the buffer.
BufferByteOffset
Move to the column n bytes into the buffer.
BufferLineOffset
Move to the nth line in the buffer.
BufferLinePercent
Move to the line n% of the way through the buffer.
Column(MoveDir1D, bool)
Move to the previous or next column n times.
The bool parameter indicates whether to cross line boundaries.
FinalNonBlank(MoveDir1D)
FirstWord(MoveDir1D)
ItemMatch
Move to the matching character of the next item.
Items are characters like (/), [/], {/}, and so on.
Line(MoveDir1D)
LineColumnOffset
Move to the nth column in the current line.
LinePercent
Move to the column n% of the way through the current line.
LinePos(MovePosition)
Move to a column at a position relative to the current line.
WordBegin(WordStyle, MoveDir1D)
WordEnd(WordStyle, MoveDir1D)
ParagraphBegin(MoveDir1D)
SentenceBegin(MoveDir1D)
SectionBegin(MoveDir1D)
SectionEnd(MoveDir1D)
ScreenFirstWord(MoveDir1D)
ScreenLine(MoveDir1D)
Move n screen lines in MoveDir1D direction.
ScreenLinePos(MovePosition)
Move to a column at a position relative to the current screen line.
ViewportPos(MovePosition)
Move to the first word of the line displayed at a position relative to the viewport.
Implementations§
Source§impl MoveType
impl MoveType
Sourcepub fn is_inclusive_motion(&self) -> bool
pub fn is_inclusive_motion(&self) -> bool
Returns true if this is an inclusive motion.
Sourcepub fn is_jumping(&self) -> bool
pub fn is_jumping(&self) -> bool
Returns true if this is a motion that causes cursor positions to be saved to
PositionList::JumpList.
Sourcepub fn shape(&self) -> TargetShape
pub fn shape(&self) -> TargetShape
Returns the shape of the text selected by this movement when editing.