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

Add default shortcut for "cmd/ctrl + R" to refreshFilesExplorer #142238

Closed
nikhilweee opened this issue Feb 4, 2022 · 1 comment
Closed

Add default shortcut for "cmd/ctrl + R" to refreshFilesExplorer #142238

nikhilweee opened this issue Feb 4, 2022 · 1 comment
Assignees
Labels
*as-designed Described behavior is as designed

Comments

@nikhilweee
Copy link

Proposal

VSCode refreshes the file explorer on file changes, but there have been complaints about this (#24309, #28432, #126817, etc). In my particular usecase (and I believe there will be others like me) I need to run a command on a remote machine and check the output several times. The file exporer isn't able to keep up with the changes, so I have to manually click on the small refresh button located on top of the explorer. I propose to add cmd + r as the default keybinding to refresh the file explorer when it is in focus. Adding the following lines to keybindings.json would do

    {
        "key": "cmd+r",
        "when": "filesExplorerFocus",
        "command": "workbench.files.action.refreshFilesExplorer"
    }

Possible Conflicts

I am aware that cmd + r is already assigned to the following scenario:

    {
         "key":"cmd+r",
         "command":"workbench.action.reloadWindow",
         "when":"isDevelopment"
    },

However, I believe the proposed shortcut does not conflict with the existing one since the proposed shortcut is only activated when the focus is on the file explorer. Moreover, there's no documentation about isDevelopment (see this stackoverflow thread), so I'm not sure if users even use this.

There are two other shortcuts added by the python and/or jupyter extensions:

    {
         "key":"cmd+r",
         "command":"python.refreshTensorBoard",
         "when":"python.hasActiveTensorBoardSession"
    },
    {
         "key":"cmd+r",
         "command":"jupyter.refreshDataViewer",
         "when":"isWorkspaceTrusted && jupyter.dataViewerActive"
    },

However, this only strengthens the case for the proposal. Again, the chances of conflict are reduced thanks to filesExplorerFocus.

Related Issues

#136662 requested changing the behaviour of cmd + N and cmd + shift + N when filesExplorerFocus == true, which was labelled out of scope because it changes the default behaviour of these shortcuts.
#124401 requested a similar feature but was denied on similar grounds.

cmd + r is a natural shortcut for refresh in most browsers so I believe this is in line with muscle memory.

@JacksonKearl
Copy link
Contributor

Developers of vscode use isDevelopent quite a bit :)

keybindings.json exists to allow you to make changes to your keybindings that may not apply to every user, this is a good use case for it. Closing as-designed for that reason.

@JacksonKearl JacksonKearl added the *as-designed Described behavior is as designed label Feb 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed
Projects
None yet
Development

No branches or pull requests

2 participants