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
Please add support for zero-based line numbers (e.g. editor.zeroBasedLineNumbers: true), so the first line is 0.
A similar request was closed due to insufficient votes. Please reconsider for the new reason below.
When developing vscode extensions, we use various zero-based properties like selection.start.line, selection.end.line, etc. I turn on editor.lineNumbers to make it easier to see what's going on, BUT, lines start at 1 so I often make mistakes when debugging. It would be much easier if I could set lines to start at 0.
I don't think this would be good. Many vscode internals use one-relative line numbers. getLineContent, folding ranges, etc. Changing those places to use zero-relative numbers would break many existing extensions. And changing only the on-screen appearance of the numbers would then add a new point of confusion when debugging. Because the displayed numbers wouldn't match the numbers stored in internal constructs like ranges.
No that's not what I meant. I don't want the APIs to change, obviously - besides, they are already 0-based. I want to optionally display 0-based line numbers in the editor, just for me.
All the APIs are 0-based, so showing 0-based line numbers would assist debugging extensions. (And there are other use cases too, see above).
Please add support for zero-based line numbers (e.g.
editor.zeroBasedLineNumbers: true
), so the first line is0
.A similar request was closed due to insufficient votes. Please reconsider for the new reason below.
When developing vscode extensions, we use various zero-based properties like
selection.start.line
,selection.end.line
, etc. I turn oneditor.lineNumbers
to make it easier to see what's going on, BUT, lines start at1
so I often make mistakes when debugging. It would be much easier if I could set lines to start at0
.Please reconsider this because:
Thanks!
The text was updated successfully, but these errors were encountered: