Author Topic: editorconfig support and elastic tabstops  (Read 1028 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1862
  • Hero Points: 179
  • Text
editorconfig support and elastic tabstops
« on: June 08, 2016, 12:42:01 am »
Elastic tabstops is a neat idea, but it fails for obvious cases such as (where -> is a tab)
int x; -> // Comment
int yqwertyuiop;
int zadad; -> // Comment


or blank lines, or basically anything you want to have aligned but where the lines are immediately adjacent, or all the adjacent lines do not have the same number of tabs.

Given it is such an incomplete "spec" it would be hard to ensure compatibility between implementations (because everyone will have different enhancements).


editorconfig is probably a more robust way to improve tabs behavior.

jwiede

  • Senior Community Member
  • Posts: 104
  • Hero Points: 12
Re: editorconfig support and elastic tabstops
« Reply #1 on: June 08, 2016, 12:52:01 am »
Actually, I believe those situations are covered, in that until alignment occurs, there is no presumption of alignment.  As long as the 'y' line lacked a comment, there'd be no need to accommodate the extra width required by its name, because it doesn't share alignment with the prior line.  Once a comment was added, there's still be no alignment until explicit effort was made to create viable alignment. 

Ideally, there needs to be a way to "merge" a line with an "alignable tab" into an existing sequence of lines sporting existing aligned tabstops, rather than have to manipulate sets of lines trying to get the system to recognize alignments.  Then the user would simply select the line with the 'y' variable, fire off that command, select a line in the prior group, and that group's tabs would be auto-adjusted to include the extra space needed to support the 'y' variable's longer name.

There are actual implementations that exist now, and I believe the author is also still "available" for inquiries.  Fleshing this out into a formalism amongst text editors would also be very useful, and perhaps could even represent an opportunity for SE.

mwb1100

  • Senior Community Member
  • Posts: 143
  • Hero Points: 13
Re: editorconfig support and elastic tabstops
« Reply #2 on: June 08, 2016, 06:03:26 pm »
editorconfig is probably a more robust way to improve tabs behavior.

I had never heard of editorconfig until this post.  +1 for editorconfig support in SE.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4964
  • Hero Points: 409
Re: editorconfig support and elastic tabstops
« Reply #3 on: June 08, 2016, 07:05:17 pm »
V21 will have .editorconfig support. You will need to turn the option on though.