pub struct VimKeybindings {
pub enabled: bool,
pub mode: VimMode,
pub command_buffer: String,
}Expand description
Vim keybindings configuration
Fields§
§enabled: boolWhether vim mode is enabled
mode: VimModeCurrent vim mode
command_buffer: StringCommand buffer for command mode
Implementations§
Source§impl VimKeybindings
impl VimKeybindings
Sourcepub fn enter_insert(&mut self)
pub fn enter_insert(&mut self)
Enter insert mode
Sourcepub fn enter_normal(&mut self)
pub fn enter_normal(&mut self)
Enter normal mode
Sourcepub fn enter_visual(&mut self)
pub fn enter_visual(&mut self)
Enter visual mode
Sourcepub fn enter_command(&mut self)
pub fn enter_command(&mut self)
Enter command mode
Sourcepub fn add_to_command(&mut self, ch: char)
pub fn add_to_command(&mut self, ch: char)
Add character to command buffer
Sourcepub fn clear_command(&mut self)
pub fn clear_command(&mut self)
Clear command buffer
Sourcepub fn get_command(&self) -> &str
pub fn get_command(&self) -> &str
Get command buffer
Sourcepub fn is_command(&self) -> bool
pub fn is_command(&self) -> bool
Check if in command mode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VimKeybindings
impl RefUnwindSafe for VimKeybindings
impl Send for VimKeybindings
impl Sync for VimKeybindings
impl Unpin for VimKeybindings
impl UnwindSafe for VimKeybindings
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> 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