Sublime Forum

Dev Build 2105

#8

[quote=“jps”]
I haven’t made up my mind if indent guides should be turned on by default or not - they seem popular, but can be visually distracting (IMHO, at least). I’ve attached a poll to this post - please let me know what you think.[/quote]

In the current state, too distracting for me too.
But sometimes very useful with the active one being highlighted.
I disabled it and created a shortcut to toggle the settings when it’s needed.

Maybe an option to try is:
when highlight_active_indent_guide is enabled and draw_indent_guides is disabled, only draw the active indent guide.

Just an idea, not certain of the result.

0 Likes

#9

I voted for leaving them ON by default simply for discoverability. IMO it would be easier for me as a new user to decide I didn’t like them and find the option to turn them off than it would be to discover they existed and the option to turn them on.

0 Likes

#10

I found a quirk with the new indent lines.

I have my indent settings set to use 2 spaces. If I ‘double’ indent a section of code w/ 4 spaces then I see duplicate indention guides.The ‘middle’ guide in the screenshot is what I’m calling the duplicate.


I would suggest not showing the indent guide if it is at the same top and bottom position as the guide before it. Applying this logic to the screenshot would mean the middle guide would not show since it starts on line 3 and ends on line 5, the same as the guide before it.

Also notable is that when there are duplicate guides like this it is impossible to make the left-most guide highlight.

0 Likes

#11

Setting highlight_active_indent_guide to false is not working for me.

0 Likes

#12

Should project files named .sublime-project still be getting named .sublime-project.sublime-workspace?

Also with projects being the focus right now, are there any plans for projects remembering the state of the sidebar? Whenever I switch between projects I find myself having to minimize the Files/Groups sections and reexpand the folders I had open under Folders.

0 Likes

#13

An annoyance with recent versions: when I hit ctrl-F to “Find”, the find panel is toggled up or down. I would rather ctrl-F always brings the find panel to the front. If I want to dismiss the find panel, ESC always works, and that’s what I usually do. (It’s a handy key that dismisses whatever panel, not just find.)

The problem I have is that I search for something, hit F3 a few times, and after reading some code, I sometimes forget if the find panel is the active panel or not – when I hit ctrl-F to search for a new keyword, the find panel is hidden, and as I type the keyword I want to search for, it ends up in my text document instead.

0 Likes

#14

Totally agree with the above. +1 for each

0 Likes

#15

If I were ever seriously worried about losing stuff, I wouldn’t be using nightlys :smile: But I still appreciate the effort to not break stuff.

Small bug with the indentation guides, the active ones don’t always show up on the whole column. Screenshot is below.

Additionally, as some people point out the active one shows up one tab higher than where they should. My screenshot shows that too.
I’m torn on this. On the one hand, I think it’s smart to do that for normal statements. However, for lines that are indented, (like for loops, html tags) I hate it. Maybe you could use the grammar indent rules to determine if it should show the active guide one column higher or at the current column, if that makes sense. Like, if the indent rules say dont indent this line, then do what sublime does now. If the indent rules say indent the next line. then show the active guide at the beginning of the text, like the beginning of the for loop, not two spaces before the for loop.

Lastly, one last tiny bit of polish that would be nice if you’re up for it. If a line is indented say 8 spaces and I click at column 2, it will draw an indent guide at column 6. I think if I click/arrow key before the first non-whitespace character, it should draw the indent guide where the cursor is. If I click after the first non-whitespace character, it draws the indent guide at that first non-whitespace character.


0 Likes

#16

If you took a vote I’ll bet most people would want better highlighting of matching pairs than indent guides.

0 Likes

#17

Gotta admit that I agree with this. The simple underlining takes quite a bit of focus to find right now. Definitely not something you can passively acknowledge.

0 Likes

#18

+1

0 Likes

#19

[quote=“ajpalkovic”]Additionally, as some people point out the active one shows up one tab higher than where they should. My screenshot shows that too.
I’m torn on this. On the one hand, I think it’s smart to do that for normal statements. However, for lines that are indented, (like for loops, html tags) I hate it. Maybe you could use the grammar indent rules to determine if it should show the active guide one column higher or at the current column, if that makes sense. Like, if the indent rules say dont indent this line, then do what sublime does now. If the indent rules say indent the next line. then show the active guide at the beginning of the text, like the beginning of the for loop, not two spaces before the for loop.[/quote]

Kinda hard to parse what you mean :s Maybe a picture? I think the expected behavior would be to check the character to the right of the guide, if it’s whitespace or the end of the line show it, if it’s anything else don’t. Being able to see where lines that contain nothing but whitespace are indented to is really important, especially in languages like Python.

0 Likes

#20

[quote=“Anomareh”]

[quote=“ajpalkovic”]Additionally, as some people point out the active one shows up one tab higher than where they should. My screenshot shows that too.
I’m torn on this. On the one hand, I think it’s smart to do that for normal statements. However, for lines that are indented, (like for loops, html tags) I hate it. Maybe you could use the grammar indent rules to determine if it should show the active guide one column higher or at the current column, if that makes sense. Like, if the indent rules say dont indent this line, then do what sublime does now. If the indent rules say indent the next line. then show the active guide at the beginning of the text, like the beginning of the for loop, not two spaces before the for loop.[/quote]

Kinda hard to parse what you mean :s Maybe a picture? I think the expected behavior would be to check the character to the right of the guide, if it’s whitespace or the end of the line show it, if it’s anything else don’t. Being able to see where lines that contain nothing but whitespace are indented to is really important, especially in languages like Python.[/quote]

Let’s say I have this code:

TAB TAB if(true) {
TAB TAB TAB doSomething();
TAB TAB }

Right now, if I click anywhere on line 0 or line 2, sublime shows an active indent guide to the right of the first tab.
If I click anywhere on line 1, sublime shows an active indent guide to the right of the second tab.

I suggest this:
If I click before the if on line 0, it shows an active indent guide at the tab closest to where I clicked.
If I click anywhere at or after the if, it shows an active indent guide to the right of the second tab. (This is because the grammar would say that line 0 changes the indent of the next line, so it shows the active indent guide at that line. The idea is the active indent guide runs from the ‘i’ to the ‘}’)

If I click before doSomething, it shows an active indent guide at the tab closest to where I clicked.
If I clicked on or after doSomething, it shows an active indent guide to the right of the second tab. (This is what sublime does now. The idea is this line does not change the indent level, show show the active indent guide at the ‘parent scope’).

0 Likes

#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