Skip to content
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

Allow to switch between recently used editors regardless of which group they are in #16463

Closed
ghost opened this issue Dec 4, 2016 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@ghost
Copy link

ghost commented Dec 4, 2016

Please implement commands to switch between recently used editors regardless of which group the editors are in. Currently, it seems as though there is only a command to switch between recently used editors in a group.

The workaround suggested by bpasero in issue #16238 is far less than ideal. It takes too many keystrokes to switch between the active document in each group.

Currently, I see the following two commands:

  • workbench.action.openNextRecentlyUsedEditorInGroup
  • workbench.action.openNextRecentlyUsedEditorInGroup

However, I would like to see two additional commands:

  • workbench.action.openNextRecentlyUsedEditor
  • workbench.action.openPreviousRecentlyUsedEditor

Thank you.

@ghost ghost changed the title Please implement workbench.action.openNextRecentlyUsedEditor and openPreviousRecentlyUsedEditor Please add commands to switch between recently used editors regardless of which group they are in. Dec 4, 2016
@bpasero
Copy link
Member

bpasero commented Dec 4, 2016

@waynebloss to be clear, you want what workbench.action.showAllEditors does but in MRU order?

@ghost
Copy link
Author

ghost commented Dec 4, 2016

@bpasero I just want to switch back to whatever the previously active document was without any further ceremony and I'd like to do it without bringing up an MRU list of any kind if that is possible (For example, like you switch between open editors in the full Visual Studio product...or the way you switch between tabs in Chrome except Chrome doesn't remember the most recently used and it just cycles left to right or right to left...)

So, if the previously active editor is in group 1, but the active editor is in group 2...I want to just hit Ctrl+Tab to switch back.

Likewise, if both editors are in the same group...I want to just hit Ctrl+Tab to switch between them.

@ghost
Copy link
Author

ghost commented Dec 4, 2016

@bpasero So to be crystal clear - workbench.action.showAllEditors does not do at all what I want.

Are you suggesting that here and other places because you think it's exactly what we're asking for or because you're pushing us to change how we work so that we can use something that exists instead of creating a new feature?

I'm just trying to understand if you're having a hard time understanding the requested feature or not...I can give you more details and visuals on exactly what's being asked if you like...

@ghost
Copy link
Author

ghost commented Dec 4, 2016

@bpasero I see that in #6605 you also mentioned a completely different tactic for using Ctrl+Tab quoted below...however, this does not work either - it still shows an MRU list which I don't want, but more importantly - opening a file from that list ignores the fact that the same file is already opened in another group...

Ctrl+Tab to navigate in entire editor history

You can change keybindings for Ctrl+Tab to show you a list of all opened editors from the history independent from the editors that are opened in a stack. Edit your keybindings and add the following:

{ "key": "ctrl+tab", "command": "workbench.action.openPreviousEditorFromHistory" },
{ "key": "ctrl+tab", "command": "workbench.action.quickOpenNavigateNext", "when": "inQuickOpen" },

@ghost
Copy link
Author

ghost commented Dec 4, 2016

@bpasero I don't care as much about whether you display an MRU list or not. If it flashes on the screen when I use Ctrl+Tab the way that it happens currently, when switching between editors within a single group...that's fine.

As long as the previously MRU editor is highlighted by default (no matter what group it's in), so that when I let go of Ctrl+Tab - the previous MRU editor is active.

So, workbench.action.showAllEditors almost does what we want except for these things:

  • The previously active editor is not highlighted by default
  • Ctrl+Tab does not cycle through that list in MRU order (So yeah, I guess you'd have to sort it in MRU order for that to happen...)

@chrmarti chrmarti added the feature-request Request for new features or functionality label Dec 5, 2016
@bpasero bpasero changed the title Please add commands to switch between recently used editors regardless of which group they are in. Allow to switch between recently used editors regardless of which group they are in Dec 5, 2016
@bpasero bpasero removed their assignment Dec 5, 2016
@jonhoo
Copy link

jonhoo commented Apr 23, 2017

@waynebloss I found that the following combination actually does what you (and I) want:

{ "command": "workbench.action.openPreviousEditorFromHistory" },
{ "command": "workbench.action.acceptSelectedQuickOpenItem" },

@bpasero bpasero self-assigned this Apr 27, 2017
@bpasero bpasero added the verification-needed Verification of issue is requested label Apr 27, 2017
@bpasero bpasero added this to the April 2017 milestone Apr 27, 2017
@bpasero
Copy link
Member

bpasero commented Apr 27, 2017

Fixed via e368b34

There are two new commands/actions:

  • workbench.action.openPreviousRecentlyUsedEditor: Open Next Recently Used Editor
  • workbench.action.openNextRecentlyUsedEditor: Open Previous Recently Used Editor

These actions should behave the same as their similar actions "Open Next Recently Used Editor In Group" and "Open Previous Recently Used Editor in Group" but they work across groups.

To verify: make sure you can use these actions to navigate back and forward in editor history, even across multiple editor groups.

@bpasero bpasero closed this as completed Apr 27, 2017
@isidorn isidorn added the verified Verification succeeded label Apr 27, 2017
@ghost
Copy link
Author

ghost commented May 3, 2017

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants