Switch Editor Tab From Any View #35253
FloppyDisco
started this conversation in
Config, Settings and Keymaps
Replies: 2 comments 2 replies
-
|
@FloppyDisco appreciate sharing the workaround. though I am still interested in getting the global key binding to work. do you have any idea if something happened for that? otherwise I might just make an issue if you did not already. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@lriesebos |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My Goal was to be able to switch the Editor tab from any view. for example switch editor tabs while focused on the project panel or the outline panel.
maybe i'm missing something about the context and commands but I am not figuring out a way to do this in a simple manner.
I cannot seem to find a command that will do it.
the command I am currently aware of is
Pane::ActivateNextItemi currently have these set to:
{ bindings: { "ctrl-tab": "pane::ActivateNextItem", "ctrl-shift-tab": "pane::ActivatePreviousItem" }, }despite being set globally, they do not work when in other views.
i suspect because if you are not focused on a 'Pane' then telling it to Activate the Next Item would be pointless, I don't know.
I was however able to create a work-around that is a little verbose, but works exactly as intended.
you will need the keybindings for moving back to the Active Pane, and keybindings that move focus to the view that you want to work in.
with those set you can achieve the desired behavior with
workspace::SendKeystrokes{ "context" : "OutlinePanel", "bindings: { "ctrl-tab": [ "workspace::SendKeystrokes", "cmd-e ctrl-tab cmd-o" ], "ctrl-shift-tab": [ "workspace::SendKeystrokes", "cmd-e ctrl-shift-tab cmd-o" ], } }effectively:
move the focus back to the active pane, switch tabs, move focus back to the outline panel.
i was able to do the same for the project panel and the git panel.
just figured i'd leave this here in case someone is looking.
Beta Was this translation helpful? Give feedback.
All reactions