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

New keyboard shortcuts CTRL+N and CTRL+ALT+N with condition for explorer #124401

Closed
CoderCH62 opened this issue May 21, 2021 · 3 comments
Closed
Assignees
Labels
file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@CoderCH62
Copy link

I suggest those two new keybindings when a folder in explorer is in focus, to create a new folder or file:

[
    {
        "key": "ctrl+alt+n",
        "command": "explorer.newFile",
        "when": "explorerResourceIsFolder && explorerViewletVisible && filesExplorerFocus && !inputFocus"
    },
    {
        "key": "ctrl+n",
        "command": "explorer.newFolder",
        "when": "explorerResourceIsFolder && explorerViewletVisible && filesExplorerFocus && !inputFocus"
    }
]

Since there is a condition, it has no conflict with the existing CTRL+N to open a new file in editor.

@CoderCH62 CoderCH62 changed the title New keyboard shortcut CTRL+N and CTRL+ALT+N with condition for explorer New keyboard shortcuts CTRL+N and CTRL+ALT+N with condition for explorer May 21, 2021
@isidorn
Copy link
Contributor

isidorn commented May 25, 2021

Some of the current users are used to Ctrl+N always opening a new untitiled file, even in the explorer.
Because of that I would change nothing here atm. However we can leave this open to gather more user feedback

@isidorn isidorn added file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach labels May 25, 2021
@isidorn isidorn added this to the Backlog milestone May 25, 2021
@zardoy
Copy link
Contributor

zardoy commented Jun 14, 2021

I suggest to change CTRL+N to always create new file in explorer. Im using this shortcut more than for an year and can say that it provides coolest possible UX:

  1. User first need to think about the file name and only then about the code
  2. It solves the problem with syntax highlighting, because user gives an extension to the filename

Again, in this case user will have already saved file, no more select language prompts or saving dialogs. There is only one downside: to be productive, user must know how to use ctrl+shift+e shortcut with left/right arrow keys to quickly navigate through the dir levels.

but i fully understand that someone still use ctrl+n to open hundreds of blank files to save then only one.

thoughts? Hope to hear feedback here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

4 participants
@isidorn @zardoy @CoderCH62 and others