You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code folding is very great useful.
But it made margin between line numbers and first character in each line.
When I use "2 spaces indent", that margin looks like indent.
Now, I use editor.rulers setting includes 0 like [0, 100, 120] to indicate a start point of a line. But it is not pretty.
Is this issue solved by any theme?
I think that it is solved by just a little changing a color of the left side area of first character in each line.
Yeah I keep trying to double check that my code doesn't have extra spaces. It's mildly irritating. Before the text was close enough to the line numbers that it was obvious where the code area was.
src\vs\workbench\browser\media\vs-dark-theme.css: Missing or bad copyright statement
src\vs\workbench\browser\media\vs-theme.css: Missing or bad copyright statement
Hygiene failed with 2 errors. Check 'build/gulpfile.hygiene.js'.
I've not touched the copyright statements at all. Looking at the hygiene file, it seems that it'll throw that error when a copyright is present. How do I commit the file then? Do I have to remove the copyright?
would very much like this fixed. I'm forever moving left but ending up at the end of the previous line. Very disorienting. Thanks Kumar Harsh (@kumarharsh)
Is this a problem only because the tab space size is small (e..g 2 spaces)? I've personally never had a problem with this, possibly because I'm using a larger tab space size.
This is what it looks like to me while I'm hovering over the glyph area.
Why do you think that is? What is different between Sublime and VSCode given option 4, with perhaps some tweaks? i would love to nail that down so that we can perhaps have a lighter weight experience in Code.
Daniel Imms (@Tyriar) I used the new version of VS Code for seconds and had the problem :-) It could well be like a new pair of glasses (its my day for analogies). Everything looks warped but after a week or two its all ok. Then again, is it good that people need to "get used to" their tools?
As for sublime, I've not been using it so can't compare. Perhaps people who are used to Sublime don't have the problem.
For me the problem was completely addressed by anseki's 0 column ruler suggestion.
{
// Show the left-edge of the code editor
"editor.leftEdgeGuide":true;
}
Would this alleviate your concerns?
I'm concerned about adding this as a default for everyone, because it appears visually noisy for people who have never had a problem without it. Additionally, we could justify adding the Option 4 approach in by default.
Would that be the explicit version of adding a 0 ruler? A bit redundant but better discoverability and reduces the pressure on choice of default (if people can easily find and change the setting). I'm agnostic on Option 4. It would not bother me but would not likely address the issue for me. Certainly would give it a try if it was there.
I am highly skeptical of option 4. Its effectiveness would seem to decrease with the number of indented lines currently being shown.
The core problem seems to be users not being able to tell where their whitespace is. It's solved in Sublime by its vertical indent guides (which is also visible in the screenshot above), and not by highlighting the line number. In my opinion, the best solutions for the issue are:
Indent guides
Pros: Works no matter the number of indents.
Cons: Probably can't be implemented this close to release, also somewhat clutters the text area but could be turned on/off via options. Which may actually end up being a pro if this isn't a problem for those using 4-space indents, since they would see no change.
Use a different gutter background color
Pros: Relatively simple to implement, better than a hard border (see below).
Cons: Only indicates where whitespace for the first column starts.
VS-style folding lines
Pros: If you're going to put something in that's effectively like a border, it might as well also solve the "how much is this button going to collapse my text" question.
Cons: Only indicates where whitespace for the first column starts.
Add a border to the gutter
Pros: Relatively simple to implement.
Cons: It's a border (see below).
Set editor.renderWhitespace to true.
Just kidding. No one shows this. It does solve the core problem without a border though!
* This assumes a strategy of "no color change or borders > color change > border" in order to limit the creation of perceived UI sections.
I'm using Sublime few years. I felt dissatisfied with undistinguishable indent.
Then, I use draw_indent_guides and draw_white_space.
"2 spaces indent" also might be the cause of this issue...
I often look at another part of code without changing current line. Therefore I hope that the edge of code area (i.e. all lines) is indicated.
I think that it is solved by just a little changing a background color of gutter. (no border line)
When I am writing a line, of course current line is here. But I know indent at here before the current line marker indicates it, because I made that indent just now.
When I am reading a code that was written, I may lose indent, and current line may not be here.
Thanks for everyone's feedback! It really helped us understand the underlying concerns.
We will be addressing this issue most likely in our April release by introducing our own flavor of draw_indent_guides, which will remove the confusion about where an indent is, no matter what tab space size you use.
Since we won't have time to get it in by March, a workaround is to use anseki's suggestion of having "editor.rulers": [0]. This will give you a left-hand reference. If you need more granularity, it may be helpful to also use "editor.renderWhitespace": true.
Hi guys. Any idea which milestone this is on? I feel kind of silly backspacing over and over on the gutter edge thinking I might have accidental indent 😏
Nizamuddin Sulieman (@kuntau) you can use a code ruler set at the far left zero position of the editable area. Add this snippet to your user settings "editor.rulers": [0]
Also, you can turn on indent guides to help further by adding this to your user settings "editor.renderIndentGuides": true
Brad Gashler (@bgashler1) that's what I did after reading this issues. That is kind of hackey solution, I'm looking for official solution as discussed above, just a bit contrast between the gutter and editor area as suggestion #3 would be nice
Nizamuddin Sulieman (@kuntau) Today there are the two ways described by Brad Gashler (@bgashler1) . I'm also looking into #14273 which will introduce a third way to workaround. We plan to make renderIndentGuides true out-of-the-box, but there is still a perf issue I wanna look into before doing that (some lookup in a tree is O(N) instead of O(H*log(N)).
Activity
kumarharsh commentedon Mar 8, 2016
+1. Not sure if this can be solved by theming. But if not, then definitely something the team should look at
mattacosta commentedon Mar 8, 2016
Yeah I keep trying to double check that my code doesn't have extra spaces. It's mildly irritating. Before the text was close enough to the line numbers that it was obvious where the code area was.
[-]Distinguish code area[/-][+]Distinguish code area from glyph area[/+]aeschli commentedon Mar 8, 2016
Assigning to Brad Gashler (@bgashler1).
alexandrudima FYI
kumarharsh commentedon Mar 8, 2016
Martin Aeschlimann (@aeschli) I'm working on a PR right now with minimal changes
kumarharsh commentedon Mar 8, 2016
Martin Aeschlimann (@aeschli) when I'm trying to commit my changes, the precommit hooks is showing this error:
I've not touched the copyright statements at all. Looking at the hygiene file, it seems that it'll throw that error when a copyright is present. How do I commit the file then? Do I have to remove the copyright?
aeschli commentedon Mar 8, 2016
I can't reproduce. I added a line vs-dark-theme.css, created a commit. Works.
Make a change to the copyright statement, create a commit, Fails.
Make sure you have also have no unstaged changes that modify the copyright.
kumarharsh commentedon Mar 8, 2016
OK, I found the bug. Are you testing on a non-Windows system?
You're creating the copyright string like this:
https://github.com/Microsoft/vscode/blob/master/build/gulpfile.hygiene.js#L93
The parts are joined with a '\n', not a '\r\n' for windows. So, when the files are being read, the strings are not equal, even though they exist.
kumarharsh commentedon Mar 8, 2016
I've added a PR for fixing that hygiene check in #3834
jeffmcaffer commentedon Mar 8, 2016
would very much like this fixed. I'm forever moving left but ending up at the end of the previous line. Very disorienting. Thanks Kumar Harsh (@kumarharsh)
bgashler1 commentedon Mar 8, 2016
Is this a problem only because the tab space size is small (e..g 2 spaces)? I've personally never had a problem with this, possibly because I'm using a larger tab space size.
This is what it looks like to me while I'm hovering over the glyph area.

Tyriar commentedon Mar 8, 2016
I've had this problem as well, the gutter has fooled me into thinking it was an indent. Most other editors use a darker gutter to distinguish the two.
22 remaining items
chrisdias commentedon Mar 12, 2016
Why do you think that is? What is different between Sublime and VSCode given option 4, with perhaps some tweaks? i would love to nail that down so that we can perhaps have a lighter weight experience in Code.
jeffmcaffer commentedon Mar 12, 2016
Daniel Imms (@Tyriar) I used the new version of VS Code for seconds and had the problem :-) It could well be like a new pair of glasses (its my day for analogies). Everything looks warped but after a week or two its all ok. Then again, is it good that people need to "get used to" their tools?
As for sublime, I've not been using it so can't compare. Perhaps people who are used to Sublime don't have the problem.
For me the problem was completely addressed by anseki's 0 column ruler suggestion.
bgashler1 commentedon Mar 12, 2016
Jeff McAffer (@jeffmcaffer): what if we introduced a left-edge guide as very simple opt-in setting:
Would this alleviate your concerns?
I'm concerned about adding this as a default for everyone, because it appears visually noisy for people who have never had a problem without it. Additionally, we could justify adding the Option 4 approach in by default.
jeffmcaffer commentedon Mar 12, 2016
Would that be the explicit version of adding a 0 ruler? A bit redundant but better discoverability and reduces the pressure on choice of default (if people can easily find and change the setting). I'm agnostic on Option 4. It would not bother me but would not likely address the issue for me. Certainly would give it a try if it was there.
mattacosta commentedon Mar 12, 2016
I am highly skeptical of option 4. Its effectiveness would seem to decrease with the number of indented lines currently being shown.
The core problem seems to be users not being able to tell where their whitespace is. It's solved in Sublime by its vertical indent guides (which is also visible in the screenshot above), and not by highlighting the line number. In my opinion, the best solutions for the issue are:
editor.renderWhitespaceto true.* This assumes a strategy of "no color change or borders > color change > border" in order to limit the creation of perceived UI sections.
anseki commentedon Mar 12, 2016
In my case:
I'm using Sublime few years. I felt dissatisfied with undistinguishable indent.
Then, I use
draw_indent_guidesanddraw_white_space."2 spaces indent" also might be the cause of this issue...
I often look at another part of code without changing current line. Therefore I hope that the edge of code area (i.e. all lines) is indicated.
I think that it is solved by just a little changing a background color of gutter. (no border line)
anseki commentedon Mar 12, 2016
When I am writing a line, of course current line is here. But I know indent at here before the current line marker indicates it, because I made that indent just now.
When I am reading a code that was written, I may lose indent, and current line may not be here.
bgashler1 commentedon Mar 15, 2016
Thanks for everyone's feedback! It really helped us understand the underlying concerns.
We will be addressing this issue most likely in our April release by introducing our own flavor of
draw_indent_guides, which will remove the confusion about where an indent is, no matter what tab space size you use.Since we won't have time to get it in by March, a workaround is to use anseki's suggestion of having
"editor.rulers": [0]. This will give you a left-hand reference. If you need more granularity, it may be helpful to also use"editor.renderWhitespace": true.kuntau commentedon Nov 4, 2016
Hi guys. Any idea which milestone this is on? I feel kind of silly backspacing over and over on the gutter edge thinking I might have accidental indent 😏
bgashler1 commentedon Nov 4, 2016
Nizamuddin Sulieman (@kuntau) you can use a code ruler set at the far left zero position of the editable area. Add this snippet to your user settings
"editor.rulers": [0]Also, you can turn on indent guides to help further by adding this to your user settings
"editor.renderIndentGuides": trueHopefully these two things will help you out.
kuntau commentedon Nov 5, 2016
Brad Gashler (@bgashler1) that's what I did after reading this issues. That is kind of hackey solution, I'm looking for official solution as discussed above, just a bit contrast between the gutter and editor area as suggestion #3 would be nice
alexdima commentedon Nov 7, 2016
Nizamuddin Sulieman (@kuntau) Today there are the two ways described by Brad Gashler (@bgashler1) . I'm also looking into #14273 which will introduce a third way to workaround. We plan to make
renderIndentGuidestrue out-of-the-box, but there is still a perf issue I wanna look into before doing that (some lookup in a tree isO(N)instead ofO(H*log(N)).