I'm using VsVim in Visual Studio 2013. Occasionally, when trying to save a file after entering text in "insert" mode, I use<ESC>:w<ENTER>, which usually works, but sometimes I fat-finger it and somehow end up closing the file's tab without saving.

Googling for close-file shortcuts in Visual Studio, it looks like these sorts of shortcuts generally use <Ctl> plus a function key. But I'm pretty sure I'm not accidentally hitting <Ctl>, and I'm certain I'm not accidentally hitting a function key.

What's going on? Can this behavior be disabled?


I finally stumbled on an answer as I was writing the question, so I figured I'd finish up the question and share the answer as well to help anyone having this same problem.

This is apparently due to the <shift><esc> shortcut. Thanks to this page (linked to in the answer that led me to <shift><esc>), the shortcut is called "Close Tool Window." This is incredibly annoying, because without this shortcut there would be no problem with hitting <shift> a little early in order to prepare for the :.

To disable the shortcut, go to the Tools > Options menu, select Keyboard under Environment from the navigation panel, search for Window.CloseTool (do not hit <ENTER>), and simply click Remove.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.