-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Make explorer keybindings configurable #4557
Comments
Cmd+Down on Mac. |
Is this configurable? And is it documented? |
Not configurable at the moment, we took the same keybindings as the finder (https://support.apple.com/en-us/HT201236) for rename (= Enter) and open (= Cmd+Down). I agree we should make this configurable though. |
@jrieken does the new menu contribution story make it any easier to associate keybindings with actions? or is that a different concept that needs to be implement using the keybinding service and co? I think both concepts are similar: You select an entry in the tree and set a context. Then you press a keybinding and expect one of the actions on this context to be invoked. All of those actions are likely also present in the context menu of that item. |
It's like this:
Since the menu item story is just adding another UI gesture to invoke a command it's not making it easier or harder it's just a second way to invoke a command. Today, there is a little debt as that we define the command (id -> function mapping) when defining a keybinding. We should extract a command registry and command service but using the existing stuff does everything you want - you can register a keybinding without keys - but stuff is a little clunky and we should add some convince functions. Tho to truly adopt the keybinding/(future) menu item story these things need to be done
|
Update from VSCodeVim: This is now our most demanded feature. |
@johnfn this is on my list to look into next milestone. |
@johnfn if you are referring to VSCodeVim/Vim#754 then I think we should create a new issue to track that because imho those keys apply to any tree we have in the workbench, not just the explorer. Imho it would be wrong to implement these keybindings on the level of the explorer, they should be supported on the level of our tree widget. The goal of this issue is to make the explorer specific actions use configurable keybindings. |
Actually let me reopen #11517 for this purpose. |
The following commands could already be assigned prior to 1.9 in the files explorer:
The following commands of the explorer and open editors view will be configurable for keybindings in our 1.10 release: Commands that work in both files explorer and opened editors view
Commands that only work in the files explorer
In addition to these commands, the following contexts are introduced for keybindings:
For example on macOS for changing the command to open from the explorer to be {
"key": "enter",
"command": "list.select",
"when": "explorerViewletVisible && filesExplorerFocus"
} |
Looks good but why are those command ids to long? Wouldn't something like |
@jrieken I agree and for all the newly introduced commands I can still make the switch to shorter commands, but harder for others that have been around for a while. We have a mix of Would be cool if we had a way to deprecate command Ids to clean this up. I have a way to show a warning message whenever a command is triggered that no longer exists (see https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/editor/editorCommands.ts#L193) but it is a bit ugly because for that to work I still need to register the old command Ids and they will show up in the list of keybindings even though they are deprecated. |
Pushed a change to shorten command Ids for the explorer. Worth mentioning that we have an insane mix of command ids ranging from using " |
Yeah, I have done things like this in the past |
@jrieken I like that, but it would be better if we could hide such commands from the list of keybindings, otherwise I think it makes things more confusing for users trying to find the right command. |
Yeah, needs a little extra info associated with it... |
Small update: I got rid of the extra |
Status
Please see #4557 (comment) for a list of available commands and contexts for explorer and opened editors view commands.
Original Description:
When the explorer is in focus, hitting
ctrl+enter
will open the selected file to the side, but as far as I can tell, there isn't a keybinding to simply open the selected file (enter
on its own will trigger renaming the file and⌘+enter
doesn't do anything).The text was updated successfully, but these errors were encountered: