-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
File explorer and tree helper #2377
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -275,6 +275,8 @@ This layer is a kludge of mappings, mostly pickers. | |||||
| `R` | Replace selections by clipboard contents | `replace_selections_with_clipboard` | | ||||||
| `/` | Global search in workspace folder | `global_search` | | ||||||
| `?` | Open command palette | `command_palette` | | ||||||
| `e` | Open or focus explorer | `toggle_or_focus_explorer` | | ||||||
| `E` | open explorer recursion | `open_explorer_recursion` | | ||||||
|
||||||
> TIP: Global search displays results in a fuzzy picker, use `space + '` to bring it back up after opening a file. | ||||||
|
||||||
|
@@ -402,3 +404,35 @@ Keys to use within prompt, Remapping currently not supported. | |||||
| `Tab` | Select next completion item | | ||||||
| `BackTab` | Select previous completion item | | ||||||
| `Enter` | Open selected | | ||||||
|
||||||
# File explorer | ||||||
Keys to use within explorer, Remapping currently not supported. | ||||||
|
||||||
| Key | Description | | ||||||
| ----- | ------------- | | ||||||
| `Escape` | Back to editor | | ||||||
| `Ctrl-c` | Close explorer | | ||||||
| `Enter` | Open file or toggle dir selected | | ||||||
| `b` | Back to current root's parent | | ||||||
| `f` | Filter items | | ||||||
| `z` | Fold currrent level | | ||||||
| `k`, `Shift-Tab`, `Up` | select previous item | | ||||||
| `j`, `Tab`, `Down` | select next item | | ||||||
Comment on lines
+419
to
+420
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In addition to these keybindings, I think adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Space-e should close the explorer if you are focused on it over Ctrl-c. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or even ignore focus, Space-e just toggles the explorer. Then there is no need to focus the explorer in order to close it |
||||||
| `h` | Scroll left | | ||||||
| `l` | Scroll right | | ||||||
| `G` | Move to last item | | ||||||
| `Ctrl-d` | Move down half page | | ||||||
| `Ctrl-u` | Move up half page | | ||||||
| `Shift-d` | Move down a page | | ||||||
| `Shift-u` | Move up a page | | ||||||
| `/` | Search item | | ||||||
| `?` | Search item reverse | | ||||||
| `n` | Repeat last search | | ||||||
| `Shift-n` | Repeat last search reverse | | ||||||
| `gg` | Move to first item | | ||||||
| `ge` | Move to last item | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is already there
better merge it with the other available option
Suggested change
|
||||||
| `gc` | Make current dir as root dir | | ||||||
| `mf` | Create new file under current item's parent | | ||||||
| `md` | Create new dir under current item's parent | | ||||||
| `rf` | Remove file selected | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a suggestion on usability, probably it would be good to include that the removal will prompt for confirmation | `rf` | Remove the selected file with confirmation
| `rd` | Remove the selected dir with confirmation I mean, probably in the future there would be an option to not require confirmation, maybe some |
||||||
| `rd` | Remove dir selected | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be called tree explorer rather than file explorer? Given that later tree explorer functionality may be reused for something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just my two cents, but I have my doubts...
"tree explorer" sounds like a name which could be used in the code because - as you correctly point out - it could share its code base for different purposes. However, IMHO that name should not be presented to the user:
The user explores... files. Not trees. 🌳
Add to that the fact that "file explorer" is a pretty common term, e.g. in desktop environments, but also in other editors/IDEs.
If we really want to use the word "tree", I could imagine the name "file tree", but I still find "file explorer" more intuitive. :)