Customizing Sublime Text 2's Multi Pane Workflow
If you're like me then you spend most of your day buried in Sublime Text 2 tabs spit across multiple panes. This is amazingly efficient as it gives you the ability to look at multiple files side by side without having to switch tabs every time you want to reference something.
I usually work in a 2 pane layout split vertically. I find myself using one pane primarily for reference material with the other being used for actual editing. Unless I'm using a big monitor, this usually means that I'm constantly resizing the amount of space that one pane has over the other to make room for reading/writing code. Previously I did it the old fashioned way, by pointing my mouse to the center line and dragging every time I needed a bit more room. That all stopped when I took some time to customize ST2's powerful keybinding system…
With a simple keystroke I can now resize windows from the normal 50/50 slit panes to 33/66 command+option+left or 66/33 command+option+right. To bring civility back its a quick touch of command+option+up and everything is back to 50/50.
This is all done by adding the following blocks to "Prefrences -> Key Bindings - User"
You'll also notice in those bindings that we have three additional commands:
- command+option+down - turns the split screen into a single pane (useful when going from a big monitor to a single laptop screen)
- control+shift+left - moves the current active file to the left pane
- control+shift+right - moves the current active file to the right pane (when there is one)
Hopefully you'll find these bindings as helpful as I have. Feel free to share your own in the comments below!