From 4ad772a1e93a068a1f4c622610efc92cacd550b7 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Mon, 3 Feb 2025 19:01:52 +0200 Subject: Added v/V in visual/visual line modes to switch between the 2 --- internal/client/ui/viminput/viminput.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'internal/client/ui/viminput') diff --git a/internal/client/ui/viminput/viminput.go b/internal/client/ui/viminput/viminput.go index a24eef8..f9c0319 100644 --- a/internal/client/ui/viminput/viminput.go +++ b/internal/client/ui/viminput/viminput.go @@ -1703,6 +1703,13 @@ func (m *Model) handleVisualModeKeys(key tea.KeyMsg) { return } + if motion == "V" { + m.SetCursorColumn(min(m.cursorColumn, len(m.lines[m.cursorLine])-1)) + m.mode = VisualLineMode + m.count = NoCount + return + } + if motion != "x" && motion != "d" && motion != "c" && motion != "y" && motion != "p" && motion != "P" { return @@ -1874,6 +1881,12 @@ func (m *Model) handleVisualLineModeKeys(key tea.KeyMsg) { return } + if motion == "v" { + m.mode = VisualMode + m.count = NoCount + return + } + if motion != "x" && motion != "d" && motion != "c" && motion != "y" && motion != "p" && motion != "P" { return -- cgit v1.3.1