Sublime Forum

Split Screen

#1

I’ve just written a small plugin to create custom split-screen layouts. Install via Github (Package Control pull request is pending), and then activate the plugin by pressing Alt+Shift+S

More instructions, examples and source code on Github:
github.com/spadgos/sublime-SplitScreen#readme

0 Likes

#2

Great Plugin! I am running triple 24" monitors so I like to have more than the default columns.

Is there any way to save a custom layout for use later? I like to organize my files between a 6x2 grid but if I switch back to a different layout everything is lost.

Thanks for the good work

0 Likes

#3

You can set the change the default if you open up the file Packages/SplitScreen/split_screen.py and change line 20 from self.window.show_input_panel("Split ratios", "70:30", self.splitWindow, None, None)
to self.window.show_input_panel("Split ratios", "1:1:1:1:1:1,1:1", self.splitWindow, None, None)

0 Likes

#4

That’s a bit of a help and a good tip, however whenever I switch layouts the tab groupings are lost.

0 Likes

#5

Hi,
a nice one, thx! :wink: I wonder if the plugin could be extended/changed easily in such way:

From the current buffer - without the ratio input - do via key-combo …

  • split horizontally
    
  • split vertically
    
  • unsplit current
    
  • unsplit all (equals the builtin "single")
    
  • restore split (previous layout)
    

That’d be my favorite way of splitting… as jEdit does, and afaik others (vim,…) in a similar way.

0 Likes

#6

The first few on your list can be achieved even without this plugin. Check out the View > Layout menu, and you should see the keybindings Alt + Shift + N, for N in 1, 2, 3, 4, 5, 7, 8, 9.

0 Likes

#7

Nope, you missed the fine print :smile: “from the current buffer”… i’m not talking about prefab layouts… the commands i listed work on any buffer in jEdit -> means you can generate any kind of split (and subsplit, and…) at will - aka generate any kind of layout the current situation requires. Plus: you can revert splits step by step (splits are hierarchical so to say), as well as toggle between current and last. ST’s fixed layouts are fairly ok (though i’d miss at least one i use often…), but don’t come close in flexibility…

0 Likes

#8

What you’re looking for isn’t currently possible with the API. @Castles_made_of_sand tried to make this a while back but could complete it without some methods in the API. Maybe in ST3.

0 Likes

#9

Ah… bummer :wink:

0 Likes

#10

I wouldn’t say it’s impossible - the only real issues are orphaned groups with no cells and a flurry of titlebar anims if you want to tidy them up - I use it all the time.

It could be better but you can still make something useful with the api that’s there.

0 Likes

#11

I just wrote github.com/euchoreo/sublime-DynamicSplit

it splits the current window in half, either vertically or horizontally (somewhat like emacs)

0 Likes

#12

You also might like github.com/SublimeText/Origami/

0 Likes

#13

I tried Origami earlier, but it didn’t work unless I grabbed it using the package installer. This is fine for my personal stuff, but we’re required to have any software that gets brought into the office virus scanned by IT. This precludes using the package installer for sublime plugins.

Anyone know how I can get Origami working from the downloaded zip file? I tried looking for the installed files from my home box, but there aren’t obvious files for me to just grab that represent the Origami package.

0 Likes

#14

You should just be able to unpack it into your Packages directory. E.g. see the manual install instructions.

0 Likes

#15

Yep, that’s how I installed most my plugins (due to the whole virus scan thing), but Origami doesn’t work. I’m assuming the one installed by the package installer is different than the latest one on github.

I wonder how I can find the version number of the one from package installer. The package installer doesn’t seem to drop files in the same place as manual install, at least for sublime 3.

0 Likes

#16

Package Manager just grabs the latest thing from github, so I don’t know why it would be different. Is there anything in your console?

0 Likes

#17

I wonder if anyone’s tried using something like treesheets (http://strlen.com/treesheets/) as a layout manager for ST.

0 Likes