From a77ec94cbcae5cb8d7e698323e19a0bbe95b7445 Mon Sep 17 00:00:00 2001 From: Axel Carlsson <93656815+axelcarl@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:11:17 +0200 Subject: [PATCH] vim: Add support for insert button (#19245) This commit adds support for using the physical insert-button. First click toggles insert mode and subsequent clicks toggle back and forth between replace and insert mode. Closes #19224 Release Notes: - Added support for using the insert button for vim_mode. --- assets/keymaps/vim.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json index fc3adcc95e..8b2a728df3 100644 --- a/assets/keymaps/vim.json +++ b/assets/keymaps/vim.json @@ -256,6 +256,7 @@ "@": ["vim::PushOperator", "ReplayRegister"], "ctrl-pagedown": "pane::ActivateNextItem", "ctrl-pageup": "pane::ActivatePrevItem", + "insert": "vim::InsertBefore", // tree-sitter related commands "[ x": "editor::SelectLargerSyntaxNode", "] x": "editor::SelectSmallerSyntaxNode", @@ -338,7 +339,8 @@ "ctrl-t": "vim::Indent", "ctrl-d": "vim::Outdent", "ctrl-k": ["vim::PushOperator", { "Digraph": {} }], - "ctrl-r": ["vim::PushOperator", "Register"] + "ctrl-r": ["vim::PushOperator", "Register"], + "insert": "vim::ToggleReplace" } }, { @@ -357,7 +359,8 @@ "ctrl-k": ["vim::PushOperator", { "Digraph": {} }], "backspace": "vim::UndoReplace", "tab": "vim::Tab", - "enter": "vim::Enter" + "enter": "vim::Enter", + "insert": "vim::InsertBefore" } }, {