#[repr(u16)]pub enum VimMode {
Show 14 variants
Normal = 0,
Insert = 1,
Visual = 2,
VisualLine = 3,
VisualBlock = 4,
Replace = 5,
CommandLine = 6,
Window = 8,
Delete = 9,
Yank = 10,
Change = 11,
Lowercase = 12,
Uppercase = 13,
ToggleCase = 14,
}Expand description
Vim editing modes.
Each variant represents a distinct Vim mode with specific behavior:
- Cursor style (block, bar, underline)
- Whether it accepts character input
- Whether it has an active selection
- Parent mode for keybinding inheritance
Variants§
Normal = 0
Normal mode - default command mode.
Insert = 1
Insert mode - text input mode.
Visual = 2
Visual character mode - character-wise selection.
VisualLine = 3
Visual line mode - line-wise selection.
VisualBlock = 4
Visual block mode - block/column selection.
Replace = 5
Replace mode - overwrite text.
CommandLine = 6
Command line mode - ex commands.
Window = 8
Window mode - window management (<C-w> prefix).
Delete = 9
Delete operator mode - waiting for motion to delete.
Yank = 10
Yank operator mode - waiting for motion to yank.
Change = 11
Change operator mode - waiting for motion to change.
Lowercase = 12
Lowercase operator mode - waiting for motion to lowercase.
Uppercase = 13
Uppercase operator mode - waiting for motion to uppercase.
ToggleCase = 14
Toggle case operator mode - waiting for motion to toggle case.
Implementations§
Source§impl VimMode
impl VimMode
Sourcepub const VISUAL_LINE_ID: ModeId
pub const VISUAL_LINE_ID: ModeId
Mode ID for Visual Line mode.
Sourcepub const VISUAL_BLOCK_ID: ModeId
pub const VISUAL_BLOCK_ID: ModeId
Mode ID for Visual Block mode.
Sourcepub const REPLACE_ID: ModeId
pub const REPLACE_ID: ModeId
Mode ID for Replace mode.
Sourcepub const COMMANDLINE_ID: ModeId
pub const COMMANDLINE_ID: ModeId
Mode ID for Command-line mode.
Sourcepub const LOWERCASE_ID: ModeId
pub const LOWERCASE_ID: ModeId
Mode ID for Lowercase operator mode.
Sourcepub const UPPERCASE_ID: ModeId
pub const UPPERCASE_ID: ModeId
Mode ID for Uppercase operator mode.
Sourcepub const TOGGLE_CASE_ID: ModeId
pub const TOGGLE_CASE_ID: ModeId
Mode ID for Toggle Case operator mode.
Trait Implementations§
Source§impl Mode for VimMode
impl Mode for VimMode
Source§fn discriminant(&self) -> u16
fn discriminant(&self) -> u16
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Source§fn cursor_style(&self) -> CursorStyle
fn cursor_style(&self) -> CursorStyle
Source§fn accepts_char_input(&self) -> bool
fn accepts_char_input(&self) -> bool
Source§fn has_selection(&self) -> bool
fn has_selection(&self) -> bool
Source§fn inherits_from(&self) -> Option<Self>
fn inherits_from(&self) -> Option<Self>
impl Copy for VimMode
impl Eq for VimMode
impl StructuralPartialEq for VimMode
Auto Trait Implementations§
impl Freeze for VimMode
impl RefUnwindSafe for VimMode
impl Send for VimMode
impl Sync for VimMode
impl Unpin for VimMode
impl UnsafeUnpin for VimMode
impl UnwindSafe for VimMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.