One of the best plugins I’ve found for vim is CommandT. It lets you open files in a very speedy and intuitive way, making it very simple to search files and open them in tabs, splits or vertical splits. Or so it should be. On OS X, opening a file on a new split doesn’t really work. You should be able to do it using the Ctrl-S shorcut but it just doesn’t work.
Today I decided to go after this problem. Looking around the net, I found an article explaining the reason:
I found a related tip indicating that by default, Terminal.app reserves Ctrl-S for old-fashioned XON/XOFF flow control.
Ok, so the Terminal app doesn’t allow us to use Ctrl-S because it’s a reserved shortcut. What to do?
Simple, just add the lines below in your ~/.bashrc
stty -ixon -ixoff
It will disable the above behavior and free Ctrl-S and Ctrl-Q for use in terminal apps!
Reminder: Just adding that to your bashrc won’t change the settings in the currently open terminal windows. Type the command above on the terminal so you can have the benefits right now, or reopen all your sessions.