-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Display Tab Indexes in VSCode #209196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Display Tab Indexes in VSCode #209196
Conversation
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to be merged
Please create an issue for this feature and link this PR. Make sure to add a detailed description which describes the use case and the problem it solves. FYI we added custom editor labels in this months release. It allows you change the name of the open editors/tabs. The setting name is |
fixes #209533 |
I like the idea of having a new variable for the tab index for custom editor labels. Maybe one that is group-relative and one that is global? |
It would be great if we could add it to this setting |
I would disagree with making this part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick review. Haven't tested yet. Also there is a merge conflict. But we still need to finish discussing if and how this should exactly work.
src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
Outdated
Show resolved
Hide resolved
I agree with your statement. I used to think that I was worried about adding too many settings and causing redundancy. In fact, what I am more concerned about is being able to correctly switch to the corresponding editor when using the vim plugin through the [tab index] gt command. I hope to use this feature in the next release so that I don't have to look for plugins every once in a while to see if they can be implemented :) |
84a50a5
to
a3e0c91
Compare
I have made the code modifications as required, specifically modifying the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still not 100% sold that this cannot be configured through editor custom labels. We now limit this feature to how the index appears by hardcoding it (using just the number or number + dot) when people maybe want to configure this (see https://github.com/mkitt/tabline.vim where colon is used).
src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts
Outdated
Show resolved
Hide resolved
2.Moved tab refresh to updateOptions. 3.Simplified the code using a ternary operator. 4.Renamed the setting from 'workbench.tabIndex.enabled' to 'workbench.editor.showTabIndex'. 5.Removed some irrelevant code.
Any updates? |
Excuse me, how is it going now |
The code is already finished, and I have also modified it according to the requirements. Then there was no further message, and I don't know what to do next either. |
@bpasero Custom Labels work solely based on the file path. It's possible that a custom label is rendered for a file which is not opened. In that case no index could be resolved. Imagine the template Also, if custom labels would use editor group information, it would probably strongly impact performance. I wonder if we could still allow this to be customized without using custom labels. Any ideas? |
@swordjjjkkk Untitled editors are not getting the index prepended: |
Is this still relevant? |
I'd like a setting to decide show tab index.
there are two reasons i need to open this pull request.
1.It's useful for vim extension use <leader>+num to switch tab pages , and this won't disturb regular users, as it is disabled by default.
2.I tried compile an oss version , but the remote-ssh Extension not support oss version.
I look forward to any feedback or suggestions for improvement. Thank you for considering.