Tuesday, August 13, 2013

Control-S + putty

I have been working in Linux a lot lately and using putty to ssh into the machines to use vim to edit ruby files.  I have a habbit of pressing control-s, regardless of what program I am in, which saves the current file in windows. 

The problem is that when you press control-s in putty, it does not save the file (not a big deal) but turns off the output.  At first glance it looks like your ssh session is frozen, but you are still sending input through.

Pressing control-q will make everything go back to normal, but it is another keystroke that you have to memorize.

I ran across a comment to a blog post that worked out great.  Just edit your ~/.bashrc and add the following lines below:
stty ixany
stty ixoff -ixon
stty stop undef
stty start undef
 The post also contains a way to map the control-s to save in vim.

No comments:

Post a Comment