pub struct VimState { /* private fields */ }Available on crate feature
markdown-preview only.Expand description
Vim keybinding state.
Tracks pending keypresses for vim-style multi-key commands.
Implementations§
Source§impl VimState
impl VimState
Sourcepub fn check_pending_gg(&mut self) -> bool
pub fn check_pending_gg(&mut self) -> bool
Check if there’s a pending ‘g’ that would complete a ‘gg’ command.
This checks if ‘g’ was pressed recently enough to form a ‘gg’ command. If valid, clears the pending state and returns true.
§Returns
true if ‘gg’ command should be executed, false otherwise.
Source§impl VimState
Clear pending g method for VimState.
impl VimState
Clear pending g method for VimState.
Sourcepub fn clear_pending_g(&mut self)
pub fn clear_pending_g(&mut self)
Clear any pending ‘g’ keypress.
Source§impl VimState
Set pending g method for VimState.
impl VimState
Set pending g method for VimState.
Sourcepub fn set_pending_g(&mut self)
pub fn set_pending_g(&mut self)
Set a pending ‘g’ keypress for potential ‘gg’ command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VimState
impl RefUnwindSafe for VimState
impl Send for VimState
impl Sync for VimState
impl Unpin for VimState
impl UnsafeUnpin for VimState
impl UnwindSafe for VimState
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more