Home Download Buy Blog Forum Support

Split Screen

Split Screen

Postby spadgos on Sun Jan 15, 2012 2:44 pm

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:
https://github.com/spadgos/sublime-SplitScreen#readme
spadgos
 
Posts: 121
Joined: Thu Oct 06, 2011 12:49 am

Re: Split Screen

Postby MikeJerome on Wed Apr 18, 2012 1:18 am

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
MikeJerome
 
Posts: 11
Joined: Mon Apr 02, 2012 7:40 am

Re: Split Screen

Postby C0D312 on Wed Apr 18, 2012 1:30 am

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

to
Code: Select all
self.window.show_input_panel("Split ratios", "1:1:1:1:1:1,1:1", self.splitWindow, None, None)
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Split Screen

Postby MikeJerome on Thu Apr 19, 2012 11:53 pm

That's a bit of a help and a good tip, however whenever I switch layouts the tab groupings are lost.
MikeJerome
 
Posts: 11
Joined: Mon Apr 02, 2012 7:40 am

Re: Split Screen

Postby jdlx on Sun May 20, 2012 10:20 am

Hi,
a nice one, thx! ;) 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.
ST2 #2181 @ OSX 10.6.8 | @github
jdlx
 
Posts: 6
Joined: Tue May 15, 2012 9:05 am

Re: Split Screen

Postby nick. on Sun May 20, 2012 2:06 pm

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.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Split Screen

Postby jdlx on Sun May 20, 2012 11:09 pm

nick. wrote:The first few on your list can be achieved even without this plugin. Check out the View > Layout ..

Nope, you missed the fine print :) "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..
ST2 #2181 @ OSX 10.6.8 | @github
jdlx
 
Posts: 6
Joined: Tue May 15, 2012 9:05 am

Re: Split Screen

Postby C0D312 on Sun May 20, 2012 11:15 pm

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.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Split Screen

Postby jdlx on Mon May 21, 2012 1:28 am

C0D312 wrote:..Maybe in ST3.

Ah.. bummer ;)
ST2 #2181 @ OSX 10.6.8 | @github
jdlx
 
Posts: 6
Joined: Tue May 15, 2012 9:05 am

Re: Split Screen

Postby sublimator on Tue May 22, 2012 4:58 pm

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.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 648
Joined: Thu Mar 20, 2008 5:41 am

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 8 guests