Monday, March 9, 2009

Ctrl-S in vi hangs my edit session

Sometimes I'm a bit stubborn and continue to work around an issue even though I know there must be a better way. Here's a great example: Working in vi, every now and again, I find myself hitting Ctrl-S when I want to save (Ctrl-S is a windows shortcut for Save for those that don't know...) And when you do that vi gets very unhappy. in fact, it seems to stop responding to all commands, and the only way I was ever able to "fix" my mistake was to close my connection to the server, and log back in. Then I would need to delete the .swp file vi creates when you are in an edit session, and then I could go back in and make all those changes over again (because, of course, I couldn't really save it...) I've been doing this sporadically, as needed, for the better part of 3 years. Today I got fed up and a quick google search (less than a minute) turned up a solution. Ctrl-Q will apparently put vi back in its place and accepting cryptic orders from me again.

No comments: