Home Download Buy Blog Forum Support

elastic tabs

elastic tabs

Postby fmarcia on Fri Oct 31, 2008 10:57 am

As Sublime Text is THE cutting-egde-text-editor, it could be interesting to implement this: http://nickgravgaard.com/elastictabstops?

What do you think?
fmarcia
 
Posts: 2
Joined: Thu Oct 30, 2008 2:27 pm

Re: elastic tabs

Postby vim on Sun Nov 02, 2008 9:52 pm

really nice, but what if i open this file in another 'plain' editor, i will see a mess... as well as if i send this file to a friend, etc. the problem is it is not standard behavior.
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: elastic tabs

Postby fmarcia on Mon Nov 03, 2008 9:57 am

Yeah, it should be optional, of course...

... or implemented as a plugin, if possible.
fmarcia
 
Posts: 2
Joined: Thu Oct 30, 2008 2:27 pm

Re: elastic tabs

Postby jdknezek on Fri Sep 18, 2009 5:32 am

Upvote! End the tabs vs. spaces war!
jdknezek
 
Posts: 1
Joined: Fri Sep 18, 2009 5:30 am

Re: elastic tabs

Postby 75th Trombone on Tue Nov 03, 2009 9:24 pm

Another upvote. This would be a marvelous option.
75th Trombone
 
Posts: 6
Joined: Thu Oct 08, 2009 4:29 pm

Re: elastic tabs

Postby gpfsmurf on Sat Dec 05, 2009 1:16 am

vim wrote:really nice, but what if i open this file in another 'plain' editor, i will see a mess... as well as if i send this file to a friend, etc. the problem is it is not standard behavior.


Actually, when the file is opened in another editor, it looks perfect, because the file is saved with spaces only.

It's been done for gedit (http://nickgravgaard.com/elastictabstops/#gedit). When you open the file, it's internally converted to tabs, and when you save it, it's converted back to spaces.

I think we could make this work in Sublime if there was a way to set non-uniform tabstops on different lines.
gpfsmurf
 
Posts: 211
Joined: Mon Jun 23, 2008 6:31 pm

Re: elastic tabs

Postby adzenith on Fri Oct 01, 2010 8:33 pm

I just wanted to bump this thread! :)
Will we see something like this in Sublime Text X?
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: elastic tabs

Postby oxman on Thu Oct 07, 2010 8:04 pm

Awesome ! A must have !
I want this feature !
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Re: elastic tabs

Postby jps on Fri Oct 08, 2010 5:16 am

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.

Although I haven't used any software that supports elastic tabstops, I suspect that in the real world, they aren't as handy as they seem: because layout is now global, a very long variable name in once function can introduce excessive whitespace in every other function in the file (i.e., blocks will be aligned with other blocks hundreds of lines away).

The primary problem elastic tabstops solve is preserving vertical alignment of neighboring blocks of text. I believe this would be better solved by the editor doing so explicitly, inserting normal whitespace as required.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: elastic tabs

Postby oxman on Fri Oct 08, 2010 2:09 pm

I don't understand why you speak of align the whole text and at the end only of lines above or belove the current line.
The elastic tabstop works only for the lines above or belove the current line when you have at least N numbers of elastic tabstop, where N is greater than or equal the N of the current line.
oxman
 
Posts: 66
Joined: Sun Aug 29, 2010 10:00 am

Next

Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests

cron