I like the concept a lot but it has a few problems as it stands. For example,
how do you vertically align multiple method parameters?

. {
.   myObject.myMethod(param1,
.                     param2,
.                     param3,
.                     param4);
. }

You'd have to do something like put a tab in before param1 to mark the boundary.
Or the editor would have to be smart enough to know that the character between
"(" and "p" was a natural boundary anyway - but then this technique would
likely not be very portable between editors even if they had support.

Chris

Would it be possible/feasible/interesting/useful to add "elastic
tabstops" to IDEA, like outlined on
http://nickgravgaard.com/elastictabstops/ ?

Kreiger




0

Chris Miller wrote:

I like the concept a lot but it has a few problems as it stands. For
example, how do you vertically align multiple method parameters?

. {
.   myObject.myMethod(param1,
.                     param2,
.                     param3,
.                     param4);
. }

You'd have to do something like put a tab in before param1 to mark the
boundary. Or the editor would have to be smart enough to know that the
character between "(" and "p" was a natural boundary anyway - but then
this technique would likely not be very portable between editors even if
they had support.


This is mentioned in the comments on
http://nickgravgaard.com/cgi-bin/elastictabstopsnews/pollxn.cgi?storypath=/firstpost.html

Basically you use spaces after the tab boundary, but i guess IDEA would
do that automatically.

It's probably not perfect, but interesting nonetheless.

     Kreiger

0

What's wrong with "smart tabs"?

0

This is huge, and I really would like it to be implemented in idea.

BoD

Christoffer "Kreiger" Hammarström a écrit :

Would it be possible/feasible/interesting/useful to add "elastic
tabstops" to IDEA, like outlined on
http://nickgravgaard.com/elastictabstops/ ?

     Kreiger

0

Tom wrote:

What's wrong with "smart tabs"?


What is a "smart tab"?

     Kreiger

0

What is a "smart tab"?


An intelligent mix of tabs and spaces to provide a good looking code
independent of the tab-size. It's an option in IDEA since ages.

Tom

0

What's wrong with "smart tabs"?

Smart tabs insert spaces to align stuff. That makes more changes in the file than what's necessary, and it doesn't work with proportional fonts. Elastic tabstops are to align stuff without changing the file. The alignment is based on actual on-screen position, not just character count.

1

请先登录再写评论。