Home Download Buy Blog Forum Support

elastic tabs

Re: elastic tabs

Postby adzenith on Fri Oct 08, 2010 4:31 pm

jps wrote:I'm personally not a fan of elastic tabstops, primarily because they significantly increase the cost of laying out text: it changes the problem from a local, per-line one, into a global problem: a modification on one line can change how every line in the buffer is rendered.

As oxman said, you only need to look at nearby lines that are similarly tabbed. There's a Java applet at this page that lets you play around with elastic tabstops.

I've actually been thinking about making a Sublime plugin that replicates the behavior of elastic tabstops through capturing the tab key and replacing it with a certain number of spaces, then looking at nearby lines and modifying them. If I find some time I'll throw something together. This use of spaces instead of tabs would also mean that the text would be completely portable into other editors.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: elastic tabs

Postby jps on Fri Oct 08, 2010 10:07 pm

Oh, yes, my mistake!

This is a problem better solved in the editing layer rather than during layout, however.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: elastic tabs

Postby oxman on Sun Jan 23, 2011 6:20 pm

+1 for this feature :)
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Re: elastic tabs

Postby oxman on Wed Feb 02, 2011 8:10 am

If you like this feature, you can vote on http://sublimetext.userecho.com/feedbac ... p-feature/ ;)
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Re: elastic tabs

Postby gpfsmurf on Thu Feb 03, 2011 9:08 pm

jps wrote:This is a problem better solved in the editing layer rather than during layout, however.

Unless we use proportional fonts.

With elastic tabstops and better looking special characters, using proportional fonts could be cool.

Imagine using a serif font for large comments, and a sans serif font for code.
And bigger character size for class declarations, and for <h1> tags.
And array indices in superscript.

Maybe I'm a bit crazy, but compare a nicely rendered math formula to a plain text one in notepad...

Clicking on the minimap should also act like google earth: zoom out until the destination is visible, then zoom in, closing in on the destination rectangle.

I also want particle effects on syntax errors.

Of course, I'll still be happy if these features only make it in 2.1 :?

Seriously though... A pretty-printer/code-beautifier can do the same job as elastic tab stops.
Unless we use proportional fonts.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: elastic tabs

Postby GreyWyvern on Fri Feb 04, 2011 10:33 pm

I would never use this. It's a very cool thing, but a) I use spaces, and b) it would be a major visual disruption if it started working when you didn't intend it to.

Seems like a lot of interface work just to help make your code pretty. And as others have mentioned, exporting to an editor which didn't have this feature would expose your "pretty" code for the mess it really is. I downvote.
GreyWyvern
 
Posts: 106
Joined: Fri Oct 23, 2009 7:08 pm
Location: Canadia

Re: elastic tabs

Postby gpfsmurf on Mon Feb 07, 2011 5:54 pm

GreyWyvern wrote:And as others have mentioned, exporting to an editor which didn't have this feature would expose your "pretty" code for the mess it really is.

No, the file would be saved with spaces
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: elastic tabs

Postby jbrooksuk on Mon Feb 07, 2011 7:30 pm

I don't see why this wouldn't be possible with a plugin to be honest. You'd only need to look between regions and the current line.

Not saying I could do it, but from what I understand of the plugin system (at least in V1.4) I see no reason for it not to be done?
jbrooksuk
 
Posts: 778
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: elastic tabs

Postby adzenith on Mon Feb 07, 2011 7:33 pm

jbrooksuk wrote:I don't see why this wouldn't be possible with a plugin to be honest. You'd only need to look between regions and the current line.


I'm actually working on a plugin for elastic tabstops right now.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: elastic tabs

Postby jbrooksuk on Mon Feb 07, 2011 7:36 pm

adzenith wrote:
jbrooksuk wrote:I don't see why this wouldn't be possible with a plugin to be honest. You'd only need to look between regions and the current line.


I'm actually working on a plugin for elastic tabstops right now.

Cool! Looking forward to seeing it!
jbrooksuk
 
Posts: 778
Joined: Sun Apr 11, 2010 10:37 am
Location: England

PreviousNext

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests