Sublime Forum

Dev Build 2105

#21

And also, just so I don’t come off wrong … I am totally fine with continuing to use a plugin for active indent guides if you don’t want to implement all of that functionality. (But I would love it if indent guides showed up when the text background color changes :smile:)

0 Likes

#22

Ah I missed that you were talking about active guides. I thought you were talking about the guides themselves as right now a line that consists of nothing but whitespace the last guide is skipped which I find kind of counterintuitive.

On what you did say though, I agree with everything besides the last thing. Clicking on or after doSomething should make the guide to the right of the third tab active as that’s the current indentation level. Seeing as the if only contains one line it’s not very useful but once there’s anything else in there I don’t think it makes much sense to make the parent scope’s guide active. If I wanted that guide to be active I’d move my cursor to be on a line at the indentation level.

Given the following, I don’t think it’d make much sense or be desired to have the parent scope’s guide active.

http://f.cl.ly/items/3s343p1R0R3b3J2o2Y2N/scrot.20110825.175549.png

You can always intuit the parent guide as it will always be the guide previous that of the active one, but as soon as the active guide isn’t always the guide at the current indentation level this is no longer true.

0 Likes

#23

In your screenshot, you have the cursor in an ‘if’. I would have the active guide right next to the if too.
HOWEVER, if you moved the cursor to continue, I would keep the active guide next to the if, NOT next to continue.
Think about it a bit. When you have ‘statements’ in a ‘block’, those all line up, you would never see the active guide. However, if for the ‘statements’ in a block’, you show the active guide for the ‘block’ (ie, one indent level higher), you would actually see it, and it might be more useable.

0 Likes

#24

The for loop was my equivalent to your if. It just so happens it has other control statements in it rather than variable declarations. If you move the cursor to the end of the line after the first continue the active guide should be the same.

My point is you don’t know what’s going to be in the control statement. Sure there might not end up being an active guide at all but you’re assuming control statements will consist of nothing more than a block of statements. I think it’s more important to have the active guide always be a constant (aka always be at the current indentation level) rather than variable (aka sometimes the parent indentation level) as with one you can always intuit the parent whereas the other you can’t.

Perhaps this illustrates my point more clearly:

http://f.cl.ly/items/2T0Z050b0y1C450s3C41/scrot.20110825.181636.png

Making the active guide that of the if would be very odd behavior to me.

0 Likes

#25

I am currently working in a file with a 76 space indent. That’s 38 tabs. I NEED active indent guides or good code folding.

0 Likes

#26

What’s the ‘block select’ command ?
Couldn’t reproduce it on my Python file.
Do you have a plugin or a non standard grammar file ?

0 Likes

#27

[quote=“sublimator”]woah, holy shitballs … epic long nested functions?

what language is it in?[/quote]

Html-ish

0 Likes