Initial visual mode

This commit is contained in:
Keith Simmons 2022-05-03 10:29:57 -07:00
parent 5e2e859413
commit 37c921f972
13 changed files with 621 additions and 113 deletions

View file

@ -6,6 +6,7 @@ use serde::Deserialize;
pub enum Mode {
Normal,
Insert,
Visual,
}
impl Default for Mode {
@ -36,6 +37,7 @@ impl VimState {
pub fn cursor_shape(&self) -> CursorShape {
match self.mode {
Mode::Normal => CursorShape::Block,
Mode::Visual => CursorShape::Block,
Mode::Insert => CursorShape::Bar,
}
}
@ -50,6 +52,7 @@ impl VimState {
"vim_mode".to_string(),
match self.mode {
Mode::Normal => "normal",
Mode::Visual => "visual",
Mode::Insert => "insert",
}
.to_string(),