29
May
2013
4 Comments

MaxPane

So I have released my second Sublime Text plugin. I always liked the split panes in Sublime Text but sometimes the one I was currently working in, I would want to maximize so I could really focus. The problem was, all I could do was reset it to a single pane view, so when I switched back to a dual column setup again all my files were still in the left pane.

Lets say I was working in File B in the following split pane:

If I switched to a single pane, then back to 2 columns it would be like:


This may seem like a minor annoyance to have to reposition the pane divider to make the right side slightly larger and put File B back over to the right; but do it again and again day after day and this minor annoyance begins to become very annoying.

For a long time I actually just dragged the pane I wanted maximized over like so:


But this eventually got old too and I decided it was time to tackle my next plugin.

The part of the API I needed to accomplish this is undocumented, but luckily there is another Sublime package that deals very closely to the same problem domain. I was able to read the source code and tinker enough to figure out how to solve the problem.

The plugin lets you actually fully maximize a pane, while keeping a snap shot of the last layout so you can easily switch back. just type cmd+shift+enter to toggle back and forth. I used that keyboard shortcut because it does the same thing in iTerm 2.

I also added keyboard shortcuts to jump between maximized panes. To learn more check out the readme.

4 Comments

5eee714742b20cd2dcccb9eb30aaa039?s=40
Thu Apr 24 13:03:45 2014
Awesome, exactly what I was looking for! Thanks!
D1b36e5895155ed5ce6cb1de669a2b8c?s=40
Tue Jul 9 16:24:36 2013
Hey - awesome work.  Solved a real annoying bug.  Can I make one feature request?  When I press cmd+shift+enter, can you also execute a cmd+k,b?  That shortcut hides the side bar.  This could be a user preference if some folks don't like that as a default.  If you have this project on github, I could fork and make a pull request (assuming I could get this feature added).  Thanks for your plugin.  One last idea, I always enjoy reading other developers installed packages, could you do a post of your favorites?
Cebb8f230ae552b94c5b7967c342c1ce?s=40
Tue Jul 16 03:41:27 2013
Thanks Chad, If you want to make a pull request that allows the user to specify a list of commands to be ran after calling the max_pane command, that would probably work. Then you could just specify that command (I believe its called * toggle_side_bar * ) in the settings. The repo is here: https://github.com/jisaacks/MaxPane
B56eb2221dfedf975c7c915ea6c5b883?s=40
Maria Agua
Tue Jul 15 07:06:27 2014
This is a great site! Thanks for providing us such a great source of information. 
Thanks! :)  http://buysoundcloudnow.com/

Leave A Comment