Home Download Buy Blog Forum Support

Dev Build 2150

Re: Dev Build 2150

Postby MrMartineau on Wed Dec 21, 2011 8:14 am

API: Added window.get_layout() and window.set_layout()


What will adding this feature enable users to do?
@MrMartineau || Setup Sublime Text quickly: Find out all you need at https://github.com/mrmartineau/SublimeTextSetup
MrMartineau
 
Posts: 78
Joined: Thu Jul 28, 2011 8:35 am

Re: Dev Build 2150

Postby sublimator on Wed Dec 21, 2011 8:36 am

MrMartineau wrote: API: Added window.get_layout() and window.set_layout()



What will adding this feature enable users to do?


Image

More seriously, have you ever used tmux? Rotating the tiles and resizing the cells/views via keyboard? All possible now.
Have you ever had a twin vertical layout setup then switched to single panel and lost your tab organisation when you went back to a twin V layout?

By adding those APIs Jon empowers the community to empower ourselves.
With just a few more APIs (available in ST1 but not yet in ST2) you could do some pretty cool stuff:

window.active_view_in_group( ... )
window.get_view_position( ... )
window.views_in_group( ... )

With an API to get a cells (rows, cols) dimensions (characters) you could create (v|h)split `at cursor` plugins.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Dev Build 2150

Postby skaet on Wed Dec 21, 2011 8:40 am

MrMartineau wrote:What will adding this feature enable users to do?

I imagine we could see some interesting plugins allowing side-by-side file comparisons. Certain VCSs come to mind :D
skaet
 
Posts: 93
Joined: Thu Sep 16, 2010 3:37 pm

Re: Dev Build 2150

Postby DSHugo on Wed Dec 21, 2011 9:24 am

I wonder, would it be possible to tweak the new "view as hexadecimal" behavior a bit. As far as I understand, hex-mode triggers when the "0" byte is found within the file, but it is usually not the case for, e.g. pdf files: these have loads of non-printable characters, but no nil byte, hence they display not-so-properly. Maybe a wider range of characters for hex-mode trigger could be used?
DSHugo
 
Posts: 42
Joined: Tue Sep 20, 2011 11:05 am

Re: Dev Build 2150

Postby CaptainCrowbar on Wed Dec 21, 2011 9:24 am

Added global setting enable_hexadecimal_encoding


Thank you!
CaptainCrowbar
 
Posts: 24
Joined: Tue Aug 02, 2011 4:31 am

Previous

Return to General Discussion

Who is online

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