View Full Version : Indentation compare
Rob Getter
24-Apr-2008, 10:21 AM
Here's an idea that I had for a feature that I think would be handy that's a bit of a departure from anything I've seen before. I would like it if I could see if code indentation is different and I would like it differentiated from other whitespace. For example, suppose the following two blocks of code are compared:
if (x)
{
if (y)
{
doit();
}
}
================
if (x && y)
{
doit();
}
I think it would be nice to see a vertical rectangle showing the difference in indentation:
if (x)
{
##if (y)
##{
## doit();
##}
}
I have wanted something like that on more than one occasion.
Michael Bulgrien
24-Apr-2008, 04:49 PM
Well, actually, if you have Visible Whitespace showing, you do see the indent difference. However, the existing indent is matched at the front end rather than the back end (see attached screenshot).
I'm don't know if the Scooter team would consider changing it that so the inserted indent is always at the left...???
Michael Bulgrien
12-Jun-2008, 10:48 AM
Scooter...
Still waiting for your thoughts on this. I've noticed it many times since my post in April:
When there is a whitespace difference at the beginning of the line, it would be nice if BC3 showed the diff on the left. This way indents would show up as an indented block instead of some lines showing an indent and other lines showing inserted whitespace in the middle of the line. This is true for tabs as well as spaces.
I understand that it would take a little extra logic to process leading whitespace this way, but it would greatly improve the look of indent differences when visible whitespace is enabled.
Michael Bulgrien
09-Jul-2008, 06:46 PM
Bump (again)
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.