ElasticNotepad icon indicating copy to clipboard operation
ElasticNotepad copied to clipboard

Enhancement: Give an option to consider indention/block deep.

Open SK-Genius opened this issue 6 years ago • 2 comments

Don't provide ElasticTabstop over lines with different indent deep.

expected:

f(x, y):
[->]if x > y:
[->][->]temp[->]:= x
[->][->]x[---->]:= y
[->][->]y[---->]:= temp
[->]start[->]:= 1
[->]end[--->]:= 10
[->][...]

unexpected:

f(x, y):
[->]if x > y:
[->][------>]temp[->]:= x
[->][------>]x[---->]:= y
[->][------>]y[---->]:= temp
[->]start[->]:= 1
[->]end[--->]:= 10
[->][...]

SK-Genius avatar Feb 07 '19 23:02 SK-Genius

Sorry, I should have replied to this earlier.

I did think about doing this back in 2006 as can be seen in the comment section of this blog post:

Without using knowledge of the language being edited (block delimiters, etc) perhaps it could be fixed by taking note of which lines contain leading tabs and treating them slightly diferently.

I've had that idea at the back of my mind for weeks but I'm a little reluctant to implement it. The problem is that I don't want the system to be too complicated or users may think it's unpredictable.

but I never did it!

That was silly of me. I'll make it a configurable setting, and then we can all try it out! 😀

nick-gravgaard avatar Feb 16 '23 10:02 nick-gravgaard