vim: Escape to normal mode when visual surround operation pending (#24484)

roycrippen4 , roy.crippen4 , and Conrad Irwin created

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 <roy.crippen4@archarithms.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Change summary

assets/keymaps/vim.json | 6 ++++++
1 file changed, 6 insertions(+)

Detailed changes

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": {