zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.08k stars 2.71k forks source link

Tracking Issue: Keyboard-only Flows #17638

Open everdimension opened 1 week ago

everdimension commented 1 week ago

Check for existing issues

Describe the feature

Zed is awesome in bringing the keyboard-only experience, but some flows are still impossible and some have problems. Namely:

Multibuffer view

Some other suggestions are mentioned here: https://github.com/zed-industries/zed/issues/17283

Tree view ("project panel")

Menus

These issues aren't about missing shortcuts but about broken behaviors

Panes


I'll try to add more issues to the list when I stumble upon them

jansol commented 1 week ago

Ctrl+p or Ctrl+e (File finder) lets you jump to any file in the project with only the keyboard. Ctrl+k, Enter (Open excerpt split) opens the file of the currently focused excerpt in a new split

Shift+Enter (Expand Excerpt) expands the current excerpt (the command palette lists actions for expanding in a specific direction and expanding all excerpts but they are not bound by default)

Ctrl + ~ (workspace: Open terminal) from the project panel opens in the parent directory of the selected file or in the selected directory

The command palette closing when tabbing out probably deserves its own issue.

everdimension commented 1 week ago

@jansol Thanks

Ctrl+p or Ctrl+e (File finder) lets you jump to any file in the project with only the keyboard.

I don't see how this is related to mentioned issues

Ctrl+k, Enter (Open excerpt split) opens the file of the currently focused excerpt in a new split

Doesn't seem to work for me. In vim normal mode, ctrl-k removes text until end of line, in insert mode it does nothing

Shift+Enter (Expand Excerpt) expands the current excerpt

Cool, thanks! Marked this one as done

Ctrl + ~ (workspace: Open terminal) from the project panel opens in the parent directory of the selected file or in the selected directory

It doesn't open terminal in the directory of current file. For me, it opens terminal in project root. But even if it did so, what I need is a bit different: I want to navigate to the desired directory in the tree view and open terminal from there, without opening any files from the mentioned directory. It may not even have any


Upd: Oooh, but I found the command for opening file from the multibuffer view, it's named "editor::OpenExcerpts" (weird that it's plural). Awesome, will mark this one as done, too

jansol commented 1 week ago

I don't see how this is related to mentioned issues

It is literally 'Jump to file' using keyboard. But I guess the "Open excerpt split" command was the functionality you were after with that item.

Doesn't seem to work for me. In vim normal mode, ctrl-k removes text until end of line, in insert mode it does nothing

Ah you are talking about vim mode specifically. I don't know the default bindings for that but clearly the functionality for doing it via the keyboard is there so it's a matter of looking at the default vim bindings or augmenting them. All else failing you could still do it through the command palette.

I want to navigate to the desired directory in the tree view and open terminal from there

That is exactly what I was doing - navigating to a file or folder without opening it. Specifically in the project panel, using only the keyboard. But vim mode may have some subtle differences here as well, you'll have to check the default vim mode bindings or the command palette for that. Weirdly enough it's not doing that now after I've restarted Zed... However workspace: Open in Terminal does appear to open the terminal in the right location when navigating the project panel and then invoking the command via the command palette. Doesn't seem to have a default binding though.