From d9183c7669a0ea12d231a010e676fe9aaf0e263b Mon Sep 17 00:00:00 2001 From: roycrippen4 <54562558+roycrippen4@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:23:10 -0500 Subject: [PATCH] vim: Escape to normal mode when visual surround operation pending (#24484) Closes #24382 Release Notes: Added a default keymap that returns the user to `normal` mode after pressing escape during a pending `visual-surround` operation. - N/A --------- Co-authored-by: roy.crippen4 Co-authored-by: Conrad Irwin --- assets/keymaps/vim.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.json index af1822d706aee72f84e73981758c5c7b2c8328e0..aa3e44892c18a30878091cbe9e59c9b616879200 100644 --- a/assets/keymaps/vim.json +++ b/assets/keymaps/vim.json @@ -381,6 +381,12 @@ "ctrl-q": ["vim::PushLiteral", {}] } }, + { + "context": "Editor && vim_mode == waiting && (vim_operator == ys || vim_operator == cs)", + "bindings": { + "escape": "vim::SwitchToNormalMode" + } + }, { "context": "vim_mode == operator", "bindings": {