From a29eefca5a6f67a500a5ba6e7d034b6f6dc3fda7 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 20 Oct 2023 10:26:17 -0600 Subject: [PATCH] ViEditor: implement I and ^ using SoftHome --- src/edit/vi.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/edit/vi.rs b/src/edit/vi.rs index e479d69..d018238 100644 --- a/src/edit/vi.rs +++ b/src/edit/vi.rs @@ -143,8 +143,7 @@ impl<'a> Edit for ViEditor<'a> { } // Enter insert mode at start of line 'I' => { - //TODO: soft home, skip whitespace - self.editor.action(font_system, Action::Home); + self.editor.action(font_system, Action::SoftHome); self.mode = Mode::Insert; } // Create line after and enter insert mode @@ -203,8 +202,7 @@ impl<'a> Edit for ViEditor<'a> { // Go to end of line '$' => self.editor.action(font_system, Action::End), // Go to start of line after whitespace - //TODO: implement this - '^' => self.editor.action(font_system, Action::Home), + '^' => self.editor.action(font_system, Action::SoftHome), // Enter command mode ':' => { self.mode = Mode::Command;