As Sublime Text is THE cutting-egde-text-editor, it could be interesting to implement this: nickgravgaard.com/elastictabstops?
What do you think?
As Sublime Text is THE cutting-egde-text-editor, it could be interesting to implement this: nickgravgaard.com/elastictabstops?
What do you think?
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.
Yeah, it should be optional, of courseā¦
ā¦ or implemented as a plugin, if possible.
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 (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.
I just wanted to bump this thread!
Will we see something like this in Sublime Text X?
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.
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.
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.
Oh, yes, my mistake!
This is a problem better solved in the editing layer rather than during layout, however.
If you like this feature, you can vote on sublimetext.userecho.com/feedbac ā¦ p-feature/
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
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.
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.
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?
[quote=āadzenithā]
Iām actually working on a plugin for elastic tabstops right now.[/quote]
Cool! Looking forward to seeing it!