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
46.95k stars 2.7k forks source link

Shortcut to open a file in project #17268

Closed paderick closed 1 week ago

paderick commented 1 week ago

Check for existing issues

Describe the feature

When a project is open, a shortcut (like e.g. Shift + command + O in Xcode for "Open Quickly" or the same in JetBrains IntelliJ) should help to find and open a file by name to save time and not need to navigate through the project navigator to find the file.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

notpeter commented 1 week ago

Are you familiar with cmd-p / ctrl-p which toggles the file_finder?

Or are asking for an enhancement to the file finder to support arbitrary paths outside of the folders in the current workspace (e.g. cmd-shift-p and then / or ~/ etc)?

paderick commented 1 week ago

Hi @notpeter, no, this shortcut was new to me. But yes, I was looking for the "Go to file" / "file_finder" functionality. For me and I guess, for the most other users also, is it confusing to have a different keymap for the most used functions which is typically the same at the most IDEs.

notpeter commented 1 week ago

Our default keymaps try to match users expectation (mac or linux/win):

Our default keymap uses cmd-shift-o for Outline::toggle, but you can remap if you'd like. Just add the following to your ~/.zed/keymap.json (cmd-k, cmd-s).

[
  {
    "context": "Workspace",
    "bindings": {
      "cmd-shift-o": "file_finder::Toggle",
    }
  },
  {
    "context": "Editor && mode == full",
    "bindings": {
      "cmd-shift-o": "file_finder::Toggle"
    }
  }
]

There was some discussion 18months ago about adding an XCode compatibility keymap perhaps that should be revisited.