Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toggle between layouts in Sublime Text 3

I'm using Sublime Text 3. I have a layout with a screen-height column on the left and three panes on the right (see figure below). This setup is great (especially with the Golden Ratio plugin), but I still miss one feature I had in vim. I had a hotkey that caused the pane that had focus to take up the entire window, like entering full-screen mode for that one file. When done, you could enter the hotkey again to revert to your previous layout. It's as if the original layout of the panes is saved, and the focused pane temporarily takes over the whole window, and when you're done editing the file full-screen, the program remembers how things were laid out and reverts to that. Here's an ASCII-art example:

          BEFORE                                 AFTER
----------------------------          ----------------------------
|            |             |          |                          |
|            |             |          |                          |
|            |-------------|          |                          |
|            |             |          |                          |
|            |             |          |                          |
|            |-------------|          |                          |
|            |             |          |                          |
|            |             |          |                          |
----------------------------          ----------------------------

By typing a hotkey, you switch from BEFORE to AFTER; typing the same hotkey again reverts you to BEFORE, with the same layout and the same tabs in each pane.

Is there a way to do this in Sublime Text 3, including a plugin that might enable this? If the reader knows how to write Sublime plugins, how hard do you imagine writing such a plugin would be? I would guess it wouldn't be too bad: a matter of stashing state somewhere and programatically telling Sublime to revert to that when switching back from full-screen mode.

like image 584
door_number_three Avatar asked Sep 27 '13 02:09

door_number_three


1 Answers

I know this is a year on, but the MaxPane plugin solves this problem.

https://github.com/jisaacks/MaxPane

Install through package manager, and then use Command Shift Enter to toggle a pane between full screen and within whichever layout you are using.

like image 177
Paul Byrne Avatar answered Oct 22 '22 00:10

Paul Byrne