ElasticTabstops icon indicating copy to clipboard operation
ElasticTabstops copied to clipboard

This is not a proper implementation of elastic tabstops

Open nick-gravgaard opened this issue 13 years ago • 7 comments

This is not a proper implementation of my invention. The whole point of elastic tabstops is that it works by moving tabstops rather than modifying the contents of the buffer (in this case by inserting spaces). The name "elastic tabstops" is a clue. There is a big difference between changing the view and changing the buffer.

As it stands the use of this package results in the contents of the buffer containing a mix of spaces and tabs for alignment which is problematic for all sorts of reasons.

I suggest that someone asks the author of Sublime Text to add the ability to set non-uniform tabstops on different lines to the API. Once that's done this package can be reworked to do it properly.

nick-gravgaard avatar Dec 15 '12 23:12 nick-gravgaard

how can i +1 this? :)

onetom avatar May 02 '13 16:05 onetom

Sign petition at http://sublimetext.userecho.com/topic/179072-/

hickford avatar May 21 '13 14:05 hickford

See also http://www.sublimetext.com/forum/viewtopic.php?f=4&t=147&p=6042#p6042 and http://sublimetext.userecho.com/topic/19265.

FichteFoll avatar May 21 '13 19:05 FichteFoll

Sign petition at http://sublimetext.userecho.com/topic/179072-/

This 404s. Any updates on support this feature natively, or at least the API functionality required?

Fironet avatar May 19 '17 06:05 Fironet

No, no updates unfortunately.

adzenith avatar May 19 '17 14:05 adzenith

How would it look if phantoms were used with a monospace font to emulate elastic tab stops without modifying the buffer?

keith-hall avatar Oct 16 '17 03:10 keith-hall

Phantoms are kind of odd with their behavior, as can be observed with https://packagecontrol.io/packages/SublimeLinter%20Inline%20Errors. If you have a long phantom with whitespace, clicking on the phantom doesn't modify the selection where it would jump to the end of the line previously. I imagine you could hack something together with having a link for each whitespace character associated with its position and reconstruct the phantom on click to only extend to the clicked character? Not sure how well this would work out.

Other than that, to my knowledge phantoms always have at least some padding.

TL;DR: I wouldn't bother with phantoms since it'll still be suboptimal at best.

FichteFoll avatar Oct 16 '17 12:10 FichteFoll