update docs content (#11374)

Move all docs to zed repo

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Conrad Irwin 2024-05-03 16:24:04 -06:00 committed by GitHub
parent 3e5dcd1bec
commit a497c49fb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 996 additions and 479 deletions

14
docs/README.md Normal file
View file

@ -0,0 +1,14 @@
Welcome to Zed's documentation.
This is built on push to `main` and published automatically to [https://zed.dev/docs](https://zed.dev/docs).
To preview the docs locally you will need to install [mdBook](https://rust-lang.github.io/mdBook/), and then run:
```
mdbook serve docs
```
### Internal docs:
- We have a Cloudflare router called `docs-proxy`that intercepts requests to `zed.dev/docs` and forwards them to the "docs" Cloudflare Pages project.
- CI uploads a new version to the Pages project from `.github/workflows/deploy_docs.yml` on every push to `main`.

View file

@ -11,3 +11,9 @@ no-section-label = true
[output.html.print]
enable = false
[output.html.redirect]
"/elixir" = "languages/elixir"
"/javascript" = "languages/javascript"
"/ruby" = "languages/ruby"
"/python" = "languages/python"

View file

@ -2,34 +2,49 @@
# General
- [Getting Started](./getting_started.md)
- [System Requirements](./system_requirements.md)
- [Feedback](./feedback.md)
- [Getting Started](./getting-started.md)
- [System Requirements](./system-requirements.md)
- [Telemetry](./telemetry.md)
- [Additional Learning Materials](./additional-learning-materials.md)
# Configuring Zed
# Configuration
- [Settings](./configuring_zed.md)
- [Key bindings](./configuring_zed__key_bindings.md)
- [Vim Mode](./configuring_zed__configuring_vim.md)
- [Configuring Zed](./configuring-zed.md)
- [Key bindings](./key-bindings.md)
- [Themes](./themes.md)
- [Vim](./vim.md)
# Using Zed
- [Workflows]()
- [Collaboration]()
- [Using AI]()
- [Assistant Panel](./assistant-panel.md)
- [Channels](./channels.md)
- [Collaboration](./collaboration.md)
- [Tasks](./tasks.md)
- [Remote Development](./remote-development.md)
# Contributing to Zed
# Language Support
- [How to Contribute]()
- [Building from Source](./developing_zed__building_zed.md)
- [macOS](./developing_zed__building_zed_macos.md)
- [Linux](./developing_zed__building_zed_linux.md)
- [Local Collaboration](./developing_zed__local_collaboration.md)
- [Adding Languages](./developing_zed__adding_languages.md)
- [Adding UI]()
- [Elixir](./languages/elixir.md)
- [Go](./languages/go.md)
- [JavaScript](./languages/javascript.md)
- [Python](./languages/python.md)
- [Ruby](./languages/ruby.md)
- [Rust](./languages/rust.md)
---
# Developing Zed
[Telemetry](./telemetry.md)
[Code of Conduct](./CODE_OF_CONDUCT.md)
- [Adding New Languages](./adding-new-languages.md)
- [Developing Zed](./developing-zed.md)
- [macOS](./development/macos.md)
- [Linux](./development/linux.md)
- [Windows](./development/windows.md)
- [Local Collaboration](./development/local-collaboration.md)
- [Release Process](./development/releases.md)
- [Debugging Crashes](./development/debugging-crashes.md)
# Community
- [Code of Conduct](./code-of-conduct.md)
- [Contributing to Zed](./contribute-to-zed.md)
- [Conversations](./conversations.md)
- [Feedback and Support](./feedback-and-support.md)

View file

@ -0,0 +1,3 @@
# Additional Learning Materials
- [Text Manipulation Kung Fu for the Aspiring Black Belt](https://zed.dev/blog/text-manipulation)

View file

@ -0,0 +1,80 @@
# Assistant Panel
The assistant panel provides you with a way to interact with OpenAI's large language models. The assistant is good for various tasks, such as generating code, asking questions about existing code, and even writing plaintext, such as emails and documentation. To open the assistant panel, toggle the right dock by using the `workspace: toggle right dock` action in the command palette (`cmd-shift-p`).
_Note: A default binding can be set to toggle the right dock via the settings._
## Setup
1. Create an [OpenAI API key](https://platform.openai.com/account/api-keys)
2. Make sure that your OpenAI account has credits
3. Open the assistant panel, using either the `assistant: toggle focus` or the `workspace: toggle right dock` action in the command palette (`cmd-shift-p`).
4. Make sure the assistant panel is focused:
![The focused assistant panel](https://zed.dev/img/assistant/assistant-focused.png)
5. Open the command palette (`cmd-shift-p`) and use the now-available `assistant: reset key` action to set your OpenAI API key:
![Enter your OpenAI API key into the field on the right and hit return](https://zed.dev/img/assistant/assistant-reset-key.png)
The OpenAI API key will be saved in your keychain.
Zed will also use the `OPENAI_API_KEY` environment variable if it's defined. If you need to reset your OpenAI API key, focus on the assistant panel and run the command palette action `assistant: reset key`.
## Having a conversation
The assistant editor in Zed functions similarly to any other editor. You can use custom key bindings and work with multiple cursors, allowing for seamless transitions between coding and engaging in discussions with the language models. However, the assistant editor differs with the inclusion of message blocks. These blocks serve as containers for text that correspond to different roles within the conversation. These roles include:
- `You`
- `Assistant`
- `System`
To begin, select a model and type a message in a `You` block.
![Asking a question](https://zed.dev/img/assistant/ask-a-question.png)
As you type, the remaining tokens count for the selected model is updated.
Inserting text from an editor is as simple as highlighting the text and running `cmd->` (`assistant: quote selection`); Zed will wrap it in a fenced code block if it is code.
![Quoting a selection](https://zed.dev/img/assistant/quoting-a-selection.png)
To submit a message, use `cmd-enter` (`assistant: assist`). Unlike typical chat applications where pressing `enter` would submit the message, in the assistant editor, our goal was to make it feel as close to a regular editor as possible. So, pressing `enter` simply inserts a newline.
After submitting a message, the assistant's response will be streamed below, in an `Assistant` message block.
![Receiving an answer](https://zed.dev/img/assistant/receiving-an-answer.png)
The stream can be cancelled at any point with `escape`. This is useful if you realize early on that the response is not what you were looking for.
If you want to start a new conversation at any time, you can use the `New Conversation` button located at the top-right corner of the assistant panel.
Simple back-and-forth conversations work well with the assistant. However, there may come a time when you want to modify the previous text in the conversation and steer it in a different direction.
## Editing a conversation
The assistant gives you the flexibility to have control over the conversation. You can freely edit any previous text, including the responses from the assistant. If you want to remove a message block entirely, simply place your cursor at the beginning of the block and use the `delete` key. A typical workflow might involve making edits and adjustments throughout the conversation to refine your inquiry or provide additional context. Here's an example:
1. Write text in a `You` block.
2. Submit the message with `cmd-enter`
3. Receive an `Assistant` response that doesn't meet your expectations
4. Cancel the response with `escape`
5. Erase the content of the `Assistant` message block and remove the block entirely
6. Add additional context to your original message
7. Submit the message with `cmd-enter`
Being able to edit previous messages gives you control over how tokens are used. You don't need to start up a new conversation to correct a mistake or to add additional context and you don't have to waste tokens by submitting follow-up corrections.
Some additional points to keep in mind:
- You are free to change the model type at any point in the conversation.
- You can cycle the role of a message block, by clicking on the role, which is useful when you receive a response in an `Assistant` block that you want to edit and send back up as a `You` block.
## Saving and loading conversations
After you submit your first message, a name for your conversation is generated by the language model, and the conversation is automatically saved to your file system in `~/.config/zed/conversations`. You can access and load previous messages by clicking on the hamburger button in the top-left corner of the assistant panel.
![Viewing assistant history](https://zed.dev/img/assistant/assistant-history.png)
## Multiple cursor demo
The assistant is capable of sending multiple requests, and receiving multiple responses, in parallel. [Here's a demo](https://zed.dev/img/post/assistant/demo.webm).

66
docs/src/channels.md Normal file
View file

@ -0,0 +1,66 @@
# Channels
At Zed we believe that great things are built by great people working together. We have designed Zed to help every individual work faster and to help teams of people work together more effectively.
### Overview
Channels provide a way to streamline collaborating for software engineers in many ways, but particularly:
- Pairing when working on something together, you both have your own screen, mouse, and keyboard.
- Mentoring its easy to jump in to someone elses context, and help them get unstuck, without the friction of pushing code up.
- Refactoring you can have multiple people join in on large refactoring without fear of conflict.
- Ambient awareness you can see what everyone else is working on with no need for status emails or meetings.
### Channels
To open the collaboration panel hit `cmd-shift-c` (or `cmd-shift-p “collab panel: toggle focus”`).
<figure><img src="../.gitbook/assets/channels-1.png" alt=""><figcaption></figcaption></figure>
Each channel corresponds to an ongoing project or work-stream. You can see whos in a channel as their avatars will show up in the sidebar. This makes it easy to see what everyone is doing and where to find them if needed.
You can create as many channels as you need. As in the example above, you can mix channels for your day job, as well as side-projects in one instance of Zed.
Joining a channel adds you to a shared room where you can work on projects together.
### Sharing projects
After joining a channel, you can `Share` a project with the other people there. This will enable them to edit the code hosted on your machine as though they had it checked out locally.
<figure><img src="../.gitbook/assets/channels-2.png" alt=""><figcaption></figcaption></figure>
When you are editing someone elses project, you still have the full power of the editor at your fingertips, you can jump to definitions, use the AI assistant, and see any diagnostic errors. This is extremely powerful for pairing, as one of you can be implementing the current method while the other is reading and researching the correct solution to the next problem. And, because you have your own config running, it feels like youre using your own machine.
### Following
You can follow someone by clicking on their avatar in the top bar, or their name in the collaboration panel. When following, your pane will show you what they are looking at, even if they are jumping between different files in the project. If you want to stop following them, you can by scrolling around, or clicking in a different part of the file.
Following is incredibly useful when youre learning a new codebase, or trying to debug together. Because you can always see what each person is looking at, theres no confusion as to what is being talked about.
As a bonus, if the other person is sharing their screen, you can follow them out of Zed and see what is going on, so you can see if the code you wrote together really works.
### Notes & Chat
Each channel has a notes file associated with it to keep track of current status, new ideas, or to collaborate on building out the design for the feature that youre working on before diving into code.
<figure><img src="../.gitbook/assets/channels-3.png" alt=""><figcaption></figcaption></figure>
The chat is also there for quickly sharing context, or getting questions answered, that are more ephemeral in nature.
Between the two, you can use Zeds collaboration mode for large-scale changes with multiple people tackling different aspects of the problem. Because youre all working on the same copy of the code, there are no merge conflicts, and because you all have access to the same notes, its easy to track progress and keep everyone in the loop.
### Inviting people
By default, channels you create can only be accessed by you. You can invite collaborators by right clicking and selecting `Manage members`.
When you have channels nested under each other, permissions are inherited. For instance, in the example above, we only need to add people to the `#zed` channel, and they will automatically gain access to `#core-editor`, `#new-languages`, and `#stability`.
Once you have added someone, they can either join your channel by clicking on it in their Zed sidebar, or you can share the link to the channel so that they can join directly.
### Livestreaming & Guests
A Channel can also be made Public. This allows anyone to join the channel by clicking on the link.
Guest users in channels can hear and see everything that is happening, and have read only access to projects and channel notes. They can use the Chat as normal.
If you'd like to invite a guest to participate in a channel for the duration of a call you can do so by right clicking on them in the Collaboration Panel. "Allowing Write Access" will allow them to edit any projects shared into the call, and to use their microphone and share their screen if they wish.

View file

@ -1,4 +1,4 @@
# Contributor Covenant Code of Conduct
# Code of Conduct
## Our Pledge

101
docs/src/collaboration.md Normal file
View file

@ -0,0 +1,101 @@
# Collaboration
Only collaborate with people that you trust. Since sharing a project gives them access to your local file system, you should not share projects with people you do not trust; they could potentially do some nasty things.
In the future, we will do more to prevent this type of access beyond the shared project and add more control over what collaborators can do, but for now, only collaborate with people you trust.
Note: we are working on a new version of this feature called [Channels](channels/). If you'd like to be part of the private beta, please contact us!
## Adding a collaborator to a call
Before you can collaborate, you'll need to add a collaborator to your contacts. To do this:
1. Open the contacts menu by clicking on the `Show contacts menu` button in the upper right-hand corner of the window or by running `collab: toggle contacts menu` (`cmd-shift-c`).
2. Click the add button to the right of the search box.
3. Search for the contact you want to add using their GitHub handle. Note: the person you are trying to add as a contact must be an existing Zed user.
### Inviting a collaborator
You can add an existing Zed user as a contact from the contacts menu, deployed from the `Show contacts menu` button in the upper right-hand corner of the window or by `collab: toggle contacts menu` (`cmd-shift-c`) and then clicking the `Search for new contact` button to the right of the search box.
![Inviting a collaborator to the current project](https://zed.dev/img/collaboration/add-a-collaborator.png)
When you invite a collaborator to a project not in a call they will receive a notification to join, and a new call is created.
![Receiving an invite to join a call](https://zed.dev/img/collaboration/receiving-an-invite.jpg)
### Inviting non-Zed users
If someone you want to collaborate with has not yet signed up for Zed, they will need to [download the app](https://zed.dev/download) and sign in for the first time before you can add them.
## Collaborating on a project
### Share a project
When you invite a collaborator to join your project, a new call begins. Your Zed windows will show the call participants in the top right of the window.
![A new Zed call with two collaborators](https://zed.dev/img/collaboration/new-call.png)
Collaborators in the same project as you are in color, and have a cursor color. Collaborators in other projects are shown in gray. Collaborators that have access to the current project will have their own cursor color under their avatar.
We aim to eliminate the distinction between local and remote projects as much as possible. Guests can open, edit, and save files, perform searches, interact with the language server, etc.
#### Unshared Projects
If a collaborator is currently in a project that is not shared, you will not be able to jump to their project or follow them until they either share the project or return to a project that is shared.
If you are in a project that isn't shared, others will not be able to join it or see its contents.
### Follow a collaborator
To follow a collaborator, click on their avatar in the top right of the window. You can also cycle through collaborators using `workspace: follow next collaborator` (`ctrl-alt-cmd-f`).
When you join a project, you'll immediately start following the collaborator that invited you.
![Automatically following the person inviting us to a project](https://zed.dev/img/collaboration/joining-a-call.png)
When you are in a pane that is following a collaborator, you will:
- follow their cursor and scroll position
- follow them to other files in the same project
- instantly swap to viewing their screen in that pane, if they are sharing their screen and leave the project
If you move your cursor or make an edit in that pane, you will stop following.
To start following again, you can click on a collaborator's avatar or cycle through following different participants by pressing `workspace: follow next collaborator` (`ctrl-alt-cmd-f`).
#### How following works
Following is confined to a particular pane. When a pane is following a collaborator, it is outlined in their cursor color.
This pane-specific behavior allows you to follow someone in one pane while navigating independently in another and can be an effective layout for some collaboration styles.
### Sharing your screen
Share your screen with collaborators in the current call by clicking on the `Share screen` button in the top right of the window.
Collaborators will see your screen if they are following you and you start viewing a window outside Zed or a project that is not shared.
Collaborators can see your entire screen when you are screen sharing, so be careful not to share anything you don't want to share. Remember to stop screen sharing when you are finished.
Call participants can open a dedicated tab for your screen share by opening the contacts menu in the top right and clicking on the `Screen` entry if you are sharing your screen.
### Adding a project
You can add a project to a call by clicking on the `Share` button next to the project name in the title bar.
### Removing a project
You can remove a project from a call by clicking on the `Unshare` button next to the project name in the title bar.
Collaborators that are currently in that project will be disconnected from the project and will not be able to rejoin it unless you share it again.
### Following a collaborator's terminal
You can follow what a collaborator is doing in their terminal by having them share their screen and following it.
In the future, we plan to allow you to collaborate in the terminal directly in a shared project.
### Leave call
You can leave a call by opening the contacts menu in the top right and clicking on the `Leave call` button.

View file

@ -1,430 +0,0 @@
Zed can be configured via a simple JSON file located at `~/.config/zed/keymap.json`.
## Predefined keymaps
We have a growing collection of pre-defined keymaps in [zed repository's keymaps folder](https://github.com/zed-industries/zed/tree/main/assets/keymaps).
A selection of base keymaps is available in the welcome screen under the "Choose a keymap" option.
Additionally, you can change the base keymap from the command palette - `⌘-Shift-P` - by selecting the "welcome: toggle base keymap selector" command.
## Custom key bindings
### Accessing custom key bindings
You can open `keymap.json` via `⌘` + `K`, `⌘` + `S`, the command palette, or the `Zed > Settings > Open Key Bindings` application menu item.
### Adding a custom key binding
To customize key bindings, specify a context and the list of bindings to set. Re-mapping an existing binding will clobber the existing binding in favor of the custom one.
An example of adding a set of custom key bindings:
```json
[
{
"context": "Editor",
"bindings": {
"ctrl-w": "editor::SelectLargerSyntaxNode",
"ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
"ctrl-c": "editor::Cancel"
}
}
]
```
You can see more examples in Zed's [`default.json`](https://zed.dev/ref/default.json)
_There are some key bindings that can't be overridden; we are working on an issue surrounding this._
## Special Keyboard Layouts
Some people have unique and custom keyboard layouts.
For example, [@TomPlanche](https://github.com/TomPlanche) having a [French keyboard](https%3A%2F%2Fcdn.shopify.com%2Fs%2Ffiles%2F1%2F0810%2F3669%2Ffiles%2Ffrench-azerty-mac-keyboard-layout-2021-keyshorts.png&f=1&nofb=1&ipt=f53a06c5e60a20b621082410aa699c8cceff269a11ff90b3b5a35c6124dbf827&ipo=images), had to type `Shift-Alt-(` in order to have a simple `[` so he made a simple layout with those 'rules':
`ù -> [`, `backtick -> ]`, `Alt-[ (where [ is the old ù) -> {`, `Alt-] -> }`.
But, it was impossible to take into account the `{` and `}` when he was typing so now, in order to ignore a binding, he can add `null` to the binding:
```json
[
{
"context": "Editor",
"bindings": {
"alt-[": null,
"alt-]": null
}
}
]
```
## All key bindings
### Global
| **Command** | **Target** | **Default Shortcut** |
| -------------------------------- | -------------- | ----------------------------- |
| Open recent | Branches | `Alt` + `⌘` + `B` |
| Toggle focus | Collab Panel | `⌘` + `Shift` + `C` |
| Toggle inlay hints | Editor | `Control` + `:` |
| Cancel | Menu | `Control` + `C` |
| Cancel | Menu | `Escape` |
| Confirm | Menu | `Enter` |
| Secondary confirm | Menu | `⌘` + `Enter` |
| Select first | Menu | `⌘` + `Up` |
| Select first | Menu | `Page Up` |
| Select first | Menu | `Shift` + `Page Down` |
| Select first | Menu | `Shift` + `Page Up` |
| Select last | Menu | `⌘` + `Down` |
| Select last | Menu | `Page Down` |
| Select next | Menu | `Control` + `N` |
| Select next | Menu | `Down` |
| Select prev | Menu | `Control` + `P` |
| Select prev | Menu | `Up` |
| Show context menu | Menu | `Control` + `Enter` |
| Activate next item | Pane | `Alt` + `⌘` + `Right` |
| Activate next item | Pane | `⌘` + `}` |
| Activate prev item | Pane | `Alt` + `⌘` + `Left` |
| Activate prev item | Pane | `⌘` + `{` |
| Close active item | Pane | `⌘` + `W` |
| Close all items | Pane | `⌘` + `K`, `⌘` + `W` |
| Close clean items | Pane | `⌘` + `K`, `U` |
| Close inactive items | Pane | `Alt` + `⌘` + `T` |
| Open recent | Projects | `Alt` + `⌘` + `O` |
| Toggle focus | Terminal Panel | `Control` + `` ` `` |
| Activate pane in direction down | Workspace | `⌘` + `K`, `⌘` + `Down` |
| Activate pane in direction left | Workspace | `⌘` + `K`, `⌘` + `Left` |
| Activate pane in direction right | Workspace | `⌘` + `K`, `⌘` + `Right` |
| Activate pane in direction up | Workspace | `⌘` + `K`, `⌘` + `Up` |
| Close inactive tabs and panes | Workspace | `Control` + `Alt` + `⌘` + `W` |
| Close window | Workspace | `⌘` + `Shift` + `W` |
| Follow next collaborator | Workspace | `Control` + `Alt` + `⌘` + `F` |
| New file | Workspace | `⌘` + `N` |
| New terminal | Workspace | `Control` + `~` |
| New window | Workspace | `⌘` + `Shift` + `N` |
| Open | Workspace | `⌘` + `O` |
| Save | Workspace | `⌘` + `S` |
| Save as | Workspace | `⌘` + `Shift` + `S` |
| Swap pane in direction | Workspace | `⌘` + `K`, `Shift` + `Down` |
| Swap pane in direction | Workspace | `⌘` + `K`, `Shift` + `Left` |
| Swap pane in direction | Workspace | `⌘` + `K`, `Shift` + `Right` |
| Swap pane in direction | Workspace | `⌘` + `K`, `Shift` + `Up` |
| Toggle zoom | Workspace | `Shift` + `Escape` |
| Debug elements | Zed | `⌘` + `Alt` + `I` |
| Decrease buffer font size | Zed | `⌘` + `` ` `` |
| Hide | Zed | `⌘` + `H` |
| Hide others | Zed | `Alt` + `⌘` + `H` |
| Increase buffer font size | Zed | `⌘` + `+` |
| Increase buffer font size | Zed | `⌘` + `=` |
| Minimize | Zed | `⌘` + `M` |
| Open settings | Zed | `⌘` + `,` |
| Quit | Zed | `⌘` + `Q` |
| Reset buffer font size | Zed | `⌘` + `0` |
| Toggle full screen | Zed | `Control` + `⌘` + `F` |
### Editor
| **Command** | **Target** | **Default Shortcut** |
| -------------------------------- | ---------- | ------------------------------------- |
| Inline assist | Assistant | `Control` + `Enter` |
| Add selection above | Editor | `⌘` + `Alt` + `Up` |
| Add selection above | Editor | `⌘` + `Control` + `P` |
| Add selection below | Editor | `⌘` + `Alt` + `Down` |
| Add selection below | Editor | `⌘` + `Control` + `N` |
| Backspace | Editor | `Backspace` |
| Backspace | Editor | `Control` + `H` |
| Backspace | Editor | `Shift` + `Backspace` |
| Cancel | Editor | `Escape` |
| Confirm code action | Editor | `Enter` |
| Confirm completion | Editor | `Enter` |
| Confirm completion | Editor | `Tab` |
| Confirm rename | Editor | `Enter` |
| Context menu first | Editor | `Page Up` |
| Context menu last | Editor | `Page Down` |
| Context menu next | Editor | `Control` + `N` |
| Context menu next | Editor | `Down` |
| Context menu prev | Editor | `Control` + `P` |
| Context menu prev | Editor | `Up` |
| Copy | Editor | `⌘` + `C` |
| Cut | Editor | `⌘` + `X` |
| Cut to end of line | Editor | `Control` + `K` |
| Delete | Editor | `Control` + `D` |
| Delete | Editor | `Delete` |
| Delete line | Editor | `Control` + `Shift` + `K` |
| Delete to beginning of line | Editor | `⌘` + `Backspace` |
| Delete to end of line | Editor | `⌘` + `Delete` |
| Delete to next subword end | Editor | `Control` + `Alt` + `D` |
| Delete to next subword end | Editor | `Control` + `Alt` + `Delete` |
| Delete to next word end | Editor | `Alt` + `D` |
| Delete to next word end | Editor | `Alt` + `Delete` |
| Delete to previous subword start | Editor | `Control` + `Alt` + `Backspace` |
| Delete to previous subword start | Editor | `Control` + `Alt` + `H` |
| Delete to previous word start | Editor | `Alt` + `Backspace` |
| Delete to previous word start | Editor | `Alt` + `H` |
| Duplicate line | Editor | `⌘` + `Shift` + `D` |
| Find all references | Editor | `Alt` + `Shift` + `F12` |
| Fold | Editor | `Alt` + `⌘` + `[` |
| Format | Editor | `⌘` + `Shift` + `I` |
| Go to definition | Editor | `F12` |
| Go to definition split | Editor | `Alt` + `F12` |
| Go to diagnostic | Editor | `F8` |
| Go to hunk | Editor | `⌘` + `F8` |
| Go to prev diagnostic | Editor | `Shift` + `F8` |
| Go to prev hunk | Editor | `⌘` + `Shift` + `F8` |
| Go to type definition | Editor | `⌘` + `F12` |
| Go to type definition split | Editor | `Alt` + `⌘` + `F12` |
| Hover | Editor | `⌘` + `K`, `⌘` + `I` |
| Indent | Editor | `⌘` + `]` |
| Join lines | Editor | `Control` + `J` |
| Move down | Editor | `Control` + `N` |
| Move down | Editor | `Down` |
| Move left | Editor | `Control` + `B` |
| Move left | Editor | `Left` |
| Move line down | Editor | `Control` + `⌘` + `Down` |
| Move line up | Editor | `Control` + `⌘` + `Up` |
| Move page down | Editor | `Control` + `V` |
| Move page down | Editor | `Shift` + `Page Down` |
| Move page up | Editor | `Alt` + `V` |
| Move page up | Editor | `Shift` + `Page Up` |
| Move right | Editor | `Control` + `F` |
| Move right | Editor | `Right` |
| Move to beginning | Editor | `⌘` + `Up` |
| Move to beginning of line | Editor | `⌘` + `Left` |
| Move to beginning of line | Editor | `Control` + `A` |
| Move to beginning of line | Editor | `Home` |
| Move to enclosing bracket | Editor | `Control` + `M` |
| Move to end | Editor | `⌘` + `Down` |
| Move to end of line | Editor | `⌘` + `Right` |
| Move to end of line | Editor | `Control` + `E` |
| Move to end of line | Editor | `End` |
| Move to end of paragraph | Editor | `Control` + `Down` |
| Move to next subword end | Editor | `Control` + `Alt` + `F` |
| Move to next subword end | Editor | `Control` + `Alt` + `Right` |
| Move to next word end | Editor | `Alt` + `F` |
| Move to next word end | Editor | `Alt` + `Right` |
| Move to previous subword start | Editor | `Control` + `Alt` + `B` |
| Move to previous subword start | Editor | `Control` + `Alt` + `Left` |
| Move to previous word start | Editor | `Alt` + `B` |
| Move to previous word start | Editor | `Alt` + `Left` |
| Move to start of paragraph | Editor | `Control` + `Up` |
| Move up | Editor | `Control` + `P` |
| Move up | Editor | `Up` |
| Next screen | Editor | `Control` + `L` |
| Open excerpts | Editor | `Alt` + `Enter` |
| Outdent | Editor | `⌘` + `[` |
| Page down | Editor | `Page Down` |
| Page up | Editor | `Page Up` |
| Paste | Editor | `⌘` + `V` |
| Redo | Editor | `⌘` + `Shift` + `Z` |
| Redo selection | Editor | `⌘` + `Shift` + `U` |
| Rename | Editor | `F2` |
| Reveal in finder | Editor | `Alt` + `⌘` + `R` |
| Select all | Editor | `⌘` + `A` |
| Select all matches | Editor | `⌘` + `Shift` + `L` |
| Select down | Editor | `Control` + `Shift` + `N` |
| Select down | Editor | `Shift` + `Down` |
| Select larger syntax node | Editor | `Alt` + `Up` |
| Select left | Editor | `Control` + `Shift` + `B` |
| Select left | Editor | `Shift` + `Left` |
| Select line | Editor | `⌘` + `L` |
| Select next | Editor | `⌘` + `D` |
| Select next | Editor | `⌘` + `K`, `⌘` + `D` |
| Select previous | Editor | `⌘` + `K`, `Control` + `⌘` + `D` |
| Select previous | Editor | `Control` + `⌘` + `D` |
| Select right | Editor | `Control` + `Shift` + `F` |
| Select right | Editor | `Shift` + `Right` |
| Select smaller syntax node | Editor | `Alt` + `Down` |
| Select to beginning | Editor | `⌘` + `Shift` + `Up` |
| Select to beginning of line | Editor | `⌘` + `Shift` + `Left` |
| Select to beginning of line | Editor | `Control` + `Shift` + `A` |
| Select to beginning of line | Editor | `Shift` + `Home` |
| Select to end | Editor | `⌘` + `Shift` + `Down` |
| Select to end of line | Editor | `⌘` + `Shift` + `Right` |
| Select to end of line | Editor | `Control` + `Shift` + `E` |
| Select to end of line | Editor | `Shift` + `End` |
| Select to end of paragraph | Editor | `Control` + `Shift` + `Down` |
| Select to next subword end | Editor | `Control` + `Alt` + `Shift` + `F` |
| Select to next subword end | Editor | `Control` + `Alt` + `Shift` + `Right` |
| Select to next word end | Editor | `Alt` + `Shift` + `F` |
| Select to next word end | Editor | `Alt` + `Shift` + `Right` |
| Select to previous subword start | Editor | `Control` + `Alt` + `Shift` + `B` |
| Select to previous subword start | Editor | `Control` + `Alt` + `Shift` + `Left` |
| Select to previous word start | Editor | `Alt` + `Shift` + `B` |
| Select to previous word start | Editor | `Alt` + `Shift` + `Left` |
| Select to start of paragraph | Editor | `Control` + `Shift` + `Up` |
| Select up | Editor | `Control` + `Shift` + `P` |
| Select up | Editor | `Shift` + `Up` |
| Show character palette | Editor | `Control` + `⌘` + `Space` |
| Show completions | Editor | `Control` + `Space` |
| Tab | Editor | `Tab` |
| Tab prev | Editor | `Shift` + `Tab` |
| Toggle code actions | Editor | `⌘` + `.` |
| Toggle comments | Editor | `⌘` + `/` |
| Transpose | Editor | `Control` + `T` |
| Undo | Editor | `⌘` + `Z` |
| Undo selection | Editor | `⌘` + `U` |
| Unfold lines | Editor | `Alt` + `⌘` + `]` |
### Editor (Full Only)
| **Command** | **Target** | **Default Shortcut** |
| ------------------- | ------------- | ----------------------- |
| Quote selection | Assistant | `⌘` + `>` |
| Deploy | Buffer Search | `⌘` + `E` |
| Deploy | Buffer Search | `⌘` + `F` |
| Next suggestion | Copilot | `Alt` + `]` |
| Previous suggestion | Copilot | `Alt` + `[` |
| Suggest | Copilot | `Alt` + `\` |
| Newline | Editor | `Enter` |
| Newline | Editor | `Shift` + `Enter` |
| Newline above | Editor | `⌘` + `Shift` + `Enter` |
| Newline below | Editor | `⌘` + `Enter` |
| Toggle soft wrap | Editor | `Alt` + `Z` |
| Toggle | Go To Line | `Control` + `G` |
| Toggle | Outline | `⌘` + `Shift` + `O` |
### Editor (Auto Height Only)
| **Command** | **Target** | **Default Shortcut** |
| ------------- | ---------- | ----------------------------- |
| Newline | Editor | `Control` + `Enter` |
| Newline below | Editor | `Control` + `Shift` + `Enter` |
### Pane
| **Command** | **Target** | **Default Shortcut** |
| ---------------------- | -------------- | -------------------- |
| Activate item 1 | Pane | `Control` + `1` |
| Activate item 2 | Pane | `Control` + `2` |
| Activate item 3 | Pane | `Control` + `3` |
| Activate item 4 | Pane | `Control` + `4` |
| Activate item 5 | Pane | `Control` + `5` |
| Activate item 6 | Pane | `Control` + `6` |
| Activate item 7 | Pane | `Control` + `7` |
| Activate item 8 | Pane | `Control` + `8` |
| Activate item 9 | Pane | `Control` + `9` |
| Activate last item | Pane | `Control` + `0` |
| Go back | Pane | `Control` + `-` |
| Go forward | Pane | `Control` + `_` |
| Reopen closed item | Pane | `⌘` + `Shift` + `T` |
| Split down | Pane | `⌘` + `K`, `Down` |
| Split left | Pane | `⌘` + `K`, `Left` |
| Split right | Pane | `⌘` + `K`, `Right` |
| Split up | Pane | `⌘` + `K`, `Up` |
| Toggle filters | Project Search | `Alt` + `⌘` + `F` |
| Toggle focus | Project Search | `⌘` + `F` |
| Toggle focus | Project Search | `⌘` + `Shift` + `F` |
| Activate regex mode | Search | `Alt` + `⌘` + `G` |
| Activate semantic mode | Search | `Alt` + `⌘` + `S` |
| Activate text mode | Search | `Alt` + `⌘` + `X` |
| Cycle mode | Search | `Alt` + `Tab` |
| Select all matches | Search | `Alt` + `Enter` |
| Select next match | Search | `⌘` + `G` |
| Select prev match | Search | `⌘` + `Shift` + `G` |
| Toggle case sensitive | Search | `Alt` + `⌘` + `C` |
| Toggle replace | Search | `⌘` + `Shift` + `H` |
| Toggle whole word | Search | `Alt` + `⌘` + `W` |
### Buffer Search Bar
| **Command** | **Target** | **Default Shortcut** |
| ---------------------- | ------------- | -------------------- |
| Dismiss | Buffer Search | `Escape` |
| Focus editor | Buffer Search | `Tab` |
| Cycle mode | Search | `Alt` + `Tab` |
| Next history query | Search | `Down` |
| Previous history query | Search | `Up` |
| Replace all | Search | `Command + Enter` |
| Replace next | Search | `Enter` |
| Select all matches | Search | `Alt` + `Enter` |
| Select next match | Search | `Enter` |
| Select prev match | Search | `Shift` + `Enter` |
### Workspace
| **Command** | **Target** | **Default Shortcut** |
| ------------------ | ----------------- | -------------------- |
| Toggle focus | Assistant | `⌘` + `?` |
| Toggle | Command Palette | `⌘` + `Shift` + `P` |
| Deploy | Diagnostics | `⌘` + `Shift` + `M` |
| Toggle | File Finder | `⌘` + `P` |
| Toggle | Language Selector | `⌘` + `K`, `M` |
| Toggle focus | Project Panel | `⌘` + `Shift` + `E` |
| Toggle | Project Symbols | `⌘` + `T` |
| Toggle | Theme Selector | `⌘` + `K`, `⌘` + `T` |
| Activate pane 1 | Workspace | `⌘` + `1` |
| Activate pane 2 | Workspace | `⌘` + `2` |
| Activate pane 3 | Workspace | `⌘` + `3` |
| Activate pane 4 | Workspace | `⌘` + `4` |
| Activate pane 5 | Workspace | `⌘` + `5` |
| Activate pane 6 | Workspace | `⌘` + `6` |
| Activate pane 7 | Workspace | `⌘` + `7` |
| Activate pane 8 | Workspace | `⌘` + `8` |
| Activate pane 9 | Workspace | `⌘` + `9` |
| Close all docks | Workspace | `Alt` + `⌘` + `Y` |
| New search | Workspace | `⌘` + `Shift` + `F` |
| Save all | Workspace | `⌘` + `Alt` + `S` |
| Toggle bottom dock | Workspace | `⌘` + `J` |
| Toggle left dock | Workspace | `⌘` + `B` |
| Toggle right dock | Workspace | `⌘` + `R` |
| Open keymap | Zed | `⌘` + `K`, `⌘` + `S` |
### Project Panel
| **Command** | **Target** | **Default Shortcut** |
| ----------------------- | ------------- | --------------------------- |
| Collapse selected entry | Project Panel | `Left` |
| Copy | Project Panel | `⌘` + `C` |
| Copy path | Project Panel | `⌘` + `Alt` + `C` |
| Copy relative path | Project Panel | `Alt` + `⌘` + `Shift` + `C` |
| Cut | Project Panel | `⌘` + `X` |
| Delete | Project Panel | `Backspace` |
| Delete (no prompt) | Project Panel | `⌘` + `Backspace` |
| Expand selected entry | Project Panel | `Right` |
| New directory | Project Panel | `Alt` + `⌘` + `N` |
| New file | Project Panel | `Command + N` |
| New search in directory | Project Panel | `Alt` + `Shift` + `F` |
| Open | Project Panel | `Space` |
| Paste | Project Panel | `⌘` + `V` |
| Rename | Project Panel | `Enter` |
| Rename | Project Panel | `F2` |
| Reveal in finder | Project Panel | `Alt` + `⌘` + `R` |
### Project Search Bar
| **Command** | **Target** | **Default Shortcut** |
| ---------------------- | -------------- | -------------------- |
| Search in new | Project Search | `⌘` + `Enter` |
| Toggle focus | Project Search | `Escape` |
| Activate regex mode | Search | `Alt` + `⌘` + `G` |
| Activate semantic mode | Search | `Alt` + `⌘` + `S` |
| Activate text mode | Search | `Alt` + `⌘` + `X` |
| Cycle mode | Search | `Alt` + `Tab` |
| Next history query | Search | `Down` |
| Previous history query | Search | `Up` |
| Replace all | Search | `Command + Enter` |
| Replace next | Search | `Enter` |
| Toggle replace | Search | `⌘` + `Shift` + `H` |
### Terminal
| **Command** | **Target** | **Default Shortcut** |
| --------------------------- | ---------- | ------------------------- |
| Clear | Terminal | `⌘` + `K` |
| Copy | Terminal | `⌘` + `C` |
| Delete line | Terminal | `⌘` + `Backspace` |
| Move to beginning of line | Terminal | `⌘` + `Left` |
| Move to end of line | Terminal | `⌘` + `Right` |
| Move to next word end | Terminal | `Alt` + `Right` |
| Move to previous word start | Terminal | `Alt` + `Left` |
| Paste | Terminal | `⌘` + `V` |
| Show character palette | Terminal | `Control` + `⌘` + `Space` |
### Assistant Editor
| **Command** | **Target** | **Default Shortcut** |
| ------------------ | ---------- | -------------------- |
| Assist | Assistant | `⌘` + `Enter` |
| Cycle message role | Assistant | `Control` + `R` |
| Quote selection | Assistant | `⌘` + `>` |
| Split | Assistant | `Shift` + `Enter` |
| Save | Workspace | `⌘` + `S` |

View file

@ -0,0 +1,15 @@
# Contributing to Zed
Thank you for your interest in contributing to the Zed! Before making contributions, we recommend reading our [CONTRIBUTRING.md](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md) guidelines. This document provides a detailed guide to contributing to Zed.
### Issues
If you're eager to dive in and start contributing immediately, check out the issues in the [issue tracker](https://github.com/zed-industries/zed/issues).
## Public Roadmap
If you're wanting to contribute by building out a feature, we recommend taking a look at our [#roadmap](https://zed.dev/roadmap). This roadmap documents, at a high level, the larger features we're planning to build out in the future.
## Zed GitHub Repository
Our codebase can be found [here](https://github.com/zed-industries/zed).

21
docs/src/conversations.md Normal file
View file

@ -0,0 +1,21 @@
# Conversations
## Zed Channels
Our Zed channel tree is public. You can find us hanging out and writing code across various channels. The root channel, [#zed](https://zed.dev/channel/zed-283), is a great place to ask questions and get to know other Zed users.
## Discord Channel
[Zed Community](https://discord.gg/qSDQ8VWc7k) is our official Discord channel. We drop in pretty regularly to answer questions and chat with the community.
## Twitter
We use Twitter to highlight new Zed features and to share our blog posts. Follow us [here](https://twitter.com/zeddotdev).
## YouTube
We have a [YouTube channel](https://www.youtube.com/@zedindustries4498) where we plan to post longer-form videos about Zed.
## Blog
Our [blog](https://zed.dev/blog) gets frequent updates. We post about big releases, new features, and under-the-hood Zed tech.

View file

@ -0,0 +1,16 @@
# Developing Zed
See the platform-specific instructions for building Zed from source:
- [macOS](./development/macos.md)
- [Linux](./development/linux.md)
- [Windows](./development/windows.md)
If you'd like to develop collaboration features, additionally see:
- [Local Collaboration](./development/local-collaboration.md)
## Contributor links
- [Releases](./development/releases.md)
- [Debugging Crashes](./development/debugging-crashes.md)

View file

@ -1,7 +0,0 @@
# Building from Source
See the platform-specific instructions for building Zed from source:
- [macOS](./developing_zed__building_zed_macos.md)
- [Linux](./developing_zed__building_zed_linux.md)
- [Windows](./developing_zed__building_zed_windows.md)

View file

@ -1,3 +1,5 @@
# Debugging Crashes
## Crashes
When an app crashes, macOS creates a `.ips` file in `~/Library/Logs/DiagnosticReports`. You can view these using the built in Console app (`cmd-space Console`) under "Crash Reports".

View file

@ -27,8 +27,7 @@ git submodule update --init --recursive
- Install [Visual Studio](https://visualstudio.microsoft.com/downloads/) with optional component `MSVC v*** - VS YYYY C++ x64/x86 build tools` and install Windows 11 or 10 SDK depending on your system
> [!NOTE]
> `v***` is your VS version and `YYYY` is year when your VS was released.
> [!NOTE] > `v***` is your VS version and `YYYY` is year when your VS was released.
## Backend dependencies

View file

@ -1,6 +1,10 @@
# Giving feedback
# Feedback and Support
## Zed repository
## Frequently asked questions
Our [FAQ](https://zed.dev/faq) is a great place to start for common questions about Zed.
## Community repository
We track our issues at [`zed-industries/zed`](https://github.com/zed-industries/zed/issues).
@ -18,12 +22,16 @@ Command palette: `file bug report`
## In-app feedback
Anonymous feedback can be submitted from within Zed via the feedback editor (command palette: `give feedback`).
Feedback can be submitted from within Zed via the feedback modal (command palette: `give feedback`).
## Zed forum
Use the [Zed forum](https://github.com/zed-industries/zed/discussions) to ask questions and learn from one another. We will be present in the forum and answering questions as well.
Use the [community forum](https://github.com/zed-industries/zed/discussions) to ask questions and learn from one another. We will be present in the forum and answering questions as well.
## Email
If you prefer to write up your thoughts as an email, you can send them to [hi@zed.dev](mailto:hi@zed.dev).
## Merch store
We have a [merch store](https://zedindustries.creator-spring.com/) where you can buy Zed stickers, shirts, and more.

View file

@ -8,7 +8,7 @@ You can obtain the release build via the [download page](https://zed.dev/downloa
## Configure Zed
Use `⌘` + `,` to open your custom settings to set things like fonts, formatting settings, per-language settings and more. You can access the default configuration using the `Zed > Settings > Open Default Settings` menu item. See [Configuring Zed](https://zed.dev/docs/configuring-zed) for all available settings.
Use `⌘` + `,` to open your custom settings to set things like fonts, formatting settings, per-language settings and more. You can access the default configuration using the `Zed > Settings > Open Default Settings` menu item. See Configuring Zed for all available settings.
## Set up your key bindings

496
docs/src/key-bindings.md Normal file
View file

@ -0,0 +1,496 @@
# Key bindings
Zed can be configured via a simple JSON file located at `~/.config/zed/keymap.json`.
## Predefined keymaps
We have a growing collection of pre-defined keymaps in [zed repository's keymaps folder](https://github.com/zed-industries/zed/tree/main/assets/keymaps). Our current keymaps include:
- Atom
- JetBrains
- SublimeText
- TextMate
- VSCode (default)
These keymaps can be set via the `base_keymap` setting in your `keymap.json` file. Additionally, if you'd like to work from a clean slate, you can provide `"None"` to the setting.
## Custom key bindings
### Accessing custom key bindings
You can open `keymap.json` via `⌘` + `K`, `⌘` + `S`, the command palette, or the `Zed > Settings > Open Key Bindings` application menu item.
### Adding a custom key binding
To customize key bindings, specify a context and the list of bindings to set. Re-mapping an existing binding will clobber the existing binding in favor of the custom one.
An example of adding a set of custom key bindings:
```json
[
{
"context": "Editor",
"bindings": {
"ctrl-w": "editor::SelectLargerSyntaxNode",
"ctrl-shift-W": "editor::SelectSmallerSyntaxNode",
"ctrl-c": "editor::Cancel"
}
}
]
```
You can see more examples in Zed's [`default.json`](https://github.com/zed-industries/zed/blob/main/assets/keymaps/default-macos.json)
_There are some key bindings that can't be overridden; we are working on an issue surrounding this._
### Keybinding syntax
Zed has the ability to match against not just a single keypress, but a sequence of keys typed in order. Each key in the `"bindings"` map is a sequence of keypresses separated with a space.
Each key press is a sequence of modifiers followed by a key. The modifiers are:
- `ctrl-` The control key
- `cmd-` On macOS, this is the command key
- `alt-` On macOS, this is the option key
- `shift-` The shift key
- `fn-` The function key
The keys can be any single unicode codepoint that your keyboard generates (for example `a`, `0`, `£` or `ç`).
A few examples:
```
"bindings": {
"cmd-k cmd-s": "zed::OpenKeyMap", // matches ⌘-k then ⌘-s
"space e": "editor::Complete", // type space then e
"ç": "editor::Complete", // matches ⌥-c
}
```
NOTE: Keys on a keyboard are not always the same as the character they generate. For example `shift-e` actually types `E` (or `alt-c` types `ç`). Zed allows you to match against either the key and its modifiers or the character it generates. This means you can specify `alt-c` or `ç`, but not `alt-ç`. It is usually better to specify the key and its modifiers, as this will work better on different keyboard layouts.
### Remapping keys
A common request is to be able to map from one sequence of keys to another. As of Zed 0.124.0 you can do this with the `workspace::SendKeystrokes` action.
```json
[
{
"bindings": {
"j k": ["workspace::SendKeystrokes", "escape"],
"alt-down": ["workspace::SendKeystrokes", "down down down down"],
"cmd-alt-c": [
"workspace::SendKeystrokes",
"cmd-shift-p copy relative path enter"
],
"cmd-alt-r": ["workspace::SendKeystrokes", "cmd-p README enter"]
}
}
]
```
There are some limitations to this, notably:
- Any asynchronous operation will not happen until after all your key bindings have been dispatched. For example this means that while you can use a binding to open a file (as in the `cmd-alt-r` example) you cannot send further keystrokes and hope to have them interpreted by the new view.
- - Other examples of asynchronous things are: communicating with a language server, changing the language of a buffer, anything that hits the network.
- There is a limit of 100 simulated keys at a time, this is to avoid accidental infinite recursion if you trigger SendKeystrokes again inside your bindings.
The argument to `SendKeystrokes` is a space-separated list of keystrokes (using the same syntax as above). Due to the way that keystrokes are parsed, any segment that is not recognized as a keypress will be sent verbatim to the currently focused input field.
### All key bindings
#### Global
| **Command** | **Target** | **Default Shortcut** |
| ------------------------- | ------------ | ----------------------- |
| Toggle focus | Collab Panel | `⌘ + Shift + C` |
| Toggle inlay hints | Editor | `Control + :` |
| Cancel | Menu | `Control + C` |
| Cancel | Menu | `Control + Escape` |
| Cancel | Menu | `Escape` |
| Cancel | Menu | `⌘ + Escape` |
| Confirm | Menu | `Enter` |
| Secondary confirm | Menu | `Control + Enter` |
| Secondary confirm | Menu | `⌘ + Enter` |
| Select first | Menu | `Page Up` |
| Select first | Menu | `Shift + Page Down` |
| Select first | Menu | `Shift + Page Up` |
| Select first | Menu | `⌘ + Up` |
| Select last | Menu | `Page Down` |
| Select last | Menu | `⌘ + Down` |
| Select next | Menu | `Control + N` |
| Select next | Menu | `Down` |
| Select prev | Menu | `Control + P` |
| Select prev | Menu | `Up` |
| Confirm input | Picker | `Alt + Enter` |
| Confirm input | Picker | `⌘ + Alt + Enter` |
| Use selected query | Picker | `Shift + Enter` |
| Close window | Workspace | `⌘ + Shift + W` |
| Follow next collaborator | Workspace | `Control + Alt + ⌘ + F` |
| Open | Workspace | `⌘ + O` |
| Toggle zoom | Workspace | `Shift + Escape` |
| Debug elements | Zed | `⌘ + Alt + I` |
| Decrease buffer font size | Zed | `⌘ + ` |
| Hide | Zed | `⌘ + H` |
| Hide others | Zed | `Alt + ⌘ + H` |
| Increase buffer font size | Zed | `⌘ + +` |
| Increase buffer font size | Zed | `⌘ + =` |
| Minimize | Zed | `⌘ + M` |
| Open settings | Zed | `⌘ + ,` |
| Quit | Zed | `⌘ + Q` |
| Reset buffer font size | Zed | `⌘ + 0` |
| Toggle full screen | Zed | `Control + ⌘ + F` |
#### Editor
| **Command** | **Target** | **Default Shortcut** |
| -------------------------------- | ---------- | ------------------------------- |
| Add selection above | Editor | `⌘ + Alt + Up` |
| Add selection above | Editor | `⌘ + Control + P` |
| Add selection below | Editor | `⌘ + Alt + Down` |
| Add selection below | Editor | `⌘ + Control + N` |
| Backspace | Editor | `Backspace` |
| Backspace | Editor | `Control + H` |
| Backspace | Editor | `Shift + Backspace` |
| Cancel | Editor | `Escape` |
| Confirm code action | Editor | `Enter` |
| Confirm completion | Editor | `Enter` |
| Confirm completion | Editor | `Tab` |
| Confirm rename | Editor | `Enter` |
| Context menu first | Editor | `Page Up` |
| Context menu last | Editor | `Page Down` |
| Context menu next | Editor | `Control + N` |
| Context menu next | Editor | `Down` |
| Context menu prev | Editor | `Control + P` |
| Context menu prev | Editor | `Up` |
| Copy | Editor | `⌘ + C` |
| Cut | Editor | `⌘ + X` |
| Cut to end of line | Editor | `Control + K` |
| Delete | Editor | `Control + D` |
| Delete | Editor | `Delete` |
| Delete line | Editor | `⌘ + Shift + K` |
| Delete to beginning of line | Editor | `⌘ + Backspace` |
| Delete to end of line | Editor | `⌘ + Delete` |
| Delete to next subword end | Editor | `Control + Alt + D` |
| Delete to next subword end | Editor | `Control + Alt + Delete` |
| Delete to next word end | Editor | `Alt + D` |
| Delete to next word end | Editor | `Alt + Delete` |
| Delete to previous subword start | Editor | `Control + Alt + Backspace` |
| Delete to previous subword start | Editor | `Control + Alt + H` |
| Delete to previous word start | Editor | `Alt + Backspace` |
| Delete to previous word start | Editor | `Alt + H` |
| Delete to previous word start | Editor | `Control + W` |
| Display cursor names | Editor | `Control + ⌘ + C` |
| Duplicate line down | Editor | `Alt + Shift + Down` |
| Duplicate line up | Editor | `Alt + Shift + Up` |
| Find all references | Editor | `Alt + Shift + F12` |
| Fold | Editor | `Alt + ⌘ + [` |
| Format | Editor | `⌘ + Shift + I` |
| Go to definition | Editor | `F12` |
| Go to definition split | Editor | `Alt + F12` |
| Go to diagnostic | Editor | `F8` |
| Go to implementation | Editor | `Shift + F12` |
| Go to prev diagnostic | Editor | `Shift + F8` |
| Go to type definition | Editor | `⌘ + F12` |
| Go to type definition split | Editor | `Alt + ⌘ + F12` |
| Hover | Editor | `⌘ + K, ⌘ + I` |
| Indent | Editor | `⌘ + ]` |
| Join lines | Editor | `Control + J` |
| Move down | Editor | `Control + N` |
| Move down | Editor | `Down` |
| Move left | Editor | `Control + B` |
| Move left | Editor | `Left` |
| Move line down | Editor | `Alt + Down` |
| Move line up | Editor | `Alt + Up` |
| Move page down | Editor | `Control + V` |
| Move page down | Editor | `Shift + Page Down` |
| Move page up | Editor | `Alt + V` |
| Move page up | Editor | `Shift + Page Up` |
| Move right | Editor | `Control + F` |
| Move right | Editor | `Right` |
| Move to beginning | Editor | `⌘ + Up` |
| Move to beginning of line | Editor | `Control + A` |
| Move to beginning of line | Editor | `Home` |
| Move to beginning of line | Editor | `⌘ + Left` |
| Move to enclosing bracket | Editor | `Control + M` |
| Move to end | Editor | `⌘ + Down` |
| Move to end of line | Editor | `Control + E` |
| Move to end of line | Editor | `End` |
| Move to end of line | Editor | `⌘ + Right` |
| Move to end of paragraph | Editor | `Control + Down` |
| Move to next subword end | Editor | `Control + Alt + F` |
| Move to next subword end | Editor | `Control + Alt + Right` |
| Move to next word end | Editor | `Alt + F` |
| Move to next word end | Editor | `Alt + Right` |
| Move to previous subword start | Editor | `Control + Alt + B` |
| Move to previous subword start | Editor | `Control + Alt + Left` |
| Move to previous word start | Editor | `Alt + B` |
| Move to previous word start | Editor | `Alt + Left` |
| Move to start of paragraph | Editor | `Control + Up` |
| Move up | Editor | `Control + P` |
| Move up | Editor | `Up` |
| Next screen | Editor | `Control + L` |
| Outdent | Editor | `⌘ + [` |
| Page down | Editor | `Page Down` |
| Page up | Editor | `Page Up` |
| Paste | Editor | `⌘ + V` |
| Redo | Editor | `⌘ + Shift + Z` |
| Redo selection | Editor | `⌘ + Shift + U` |
| Rename | Editor | `F2` |
| Reveal in finder | Editor | `Alt + ⌘ + R` |
| Revert selected hunks | Editor | `⌘ + Alt + Z` |
| Select all | Editor | `⌘ + A` |
| Select all matches | Editor | `⌘ + Shift + L` |
| Select down | Editor | `Control + Shift + N` |
| Select down | Editor | `Shift + Down` |
| Select larger syntax node | Editor | `Control + Shift + Right` |
| Select left | Editor | `Control + Shift + B` |
| Select left | Editor | `Shift + Left` |
| Select line | Editor | `⌘ + L` |
| Select next | Editor | `⌘ + D` |
| Select next | Editor | `⌘ + K, ⌘ + D` |
| Select previous | Editor | `Control + ⌘ + D` |
| Select previous | Editor | `⌘ + K, Control + ⌘ + D` |
| Select right | Editor | `Control + Shift + F` |
| Select right | Editor | `Shift + Right` |
| Select smaller syntax node | Editor | `Control + Shift + Left` |
| Select to beginning | Editor | `⌘ + Shift + Up` |
| Select to beginning of line | Editor | `Control + Shift + A` |
| Select to beginning of line | Editor | `Shift + Home` |
| Select to beginning of line | Editor | `⌘ + Shift + Left` |
| Select to end | Editor | `⌘ + Shift + Down` |
| Select to end of line | Editor | `Control + Shift + E` |
| Select to end of line | Editor | `Shift + End` |
| Select to end of line | Editor | `⌘ + Shift + Right` |
| Select to end of paragraph | Editor | `Control + Shift + Down` |
| Select to next subword end | Editor | `Control + Alt + Shift + F` |
| Select to next subword end | Editor | `Control + Alt + Shift + Right` |
| Select to next word end | Editor | `Alt + Shift + F` |
| Select to next word end | Editor | `Alt + Shift + Right` |
| Select to previous subword start | Editor | `Control + Alt + Shift + B` |
| Select to previous subword start | Editor | `Control + Alt + Shift + Left` |
| Select to previous word start | Editor | `Alt + Shift + B` |
| Select to previous word start | Editor | `Alt + Shift + Left` |
| Select to start of paragraph | Editor | `Control + Shift + Up` |
| Select up | Editor | `Control + Shift + P` |
| Select up | Editor | `Shift + Up` |
| Show character palette | Editor | `Control + ⌘ + Space` |
| Show completions | Editor | `Control + Space` |
| Show inline completion | Editor | `Alt + \` |
| Tab | Editor | `Tab` |
| Tab prev | Editor | `Shift + Tab` |
| Toggle code actions | Editor | `⌘ + .` |
| Toggle comments | Editor | `⌘ + /` |
| Toggle git blame | Editor | `⌘ + Alt + G, B` |
| Toggle line numbers | Editor | `⌘ + ;` |
| Transpose | Editor | `Control + T` |
| Undo | Editor | `⌘ + Z` |
| Undo selection | Editor | `⌘ + U` |
| Unfold lines | Editor | `Alt + ⌘ + ]` |
#### Editor (Full Only)
| **Command** | **Target** | **Default Shortcut** |
| -------------------------------- | ------------- | -------------------- |
| Inline assist | Assistant | `Control + Enter` |
| Quote selection | Assistant | `⌘ + >` |
| Deploy | Buffer Search | `⌘ + Alt + F` |
| Deploy | Buffer Search | `⌘ + E` |
| Deploy | Buffer Search | `⌘ + F` |
| Accept partial inline completion | Editor | `Alt + Right` |
| Go to hunk | Editor | `⌘ + F8` |
| Go to prev hunk | Editor | `⌘ + Shift + F8` |
| Newline | Editor | `Enter` |
| Newline | Editor | `Shift + Enter` |
| Newline above | Editor | `⌘ + Shift + Enter` |
| Newline below | Editor | `⌘ + Enter` |
| Next inline completion | Editor | `Alt + ]` |
| Open excerpts | Editor | `Alt + Enter` |
| Open excerpts split | Editor | `⌘ + K, Enter` |
| Previous inline completion | Editor | `Alt + [` |
| Toggle soft wrap | Editor | `Alt + Z` |
| Toggle | Go To Line | `Control + G` |
| Toggle | Outline | `⌘ + Shift + O` |
#### Editor (Auto Height Only)
| **Command** | **Target** | **Default Shortcut** |
| ------------- | ---------- | ------------------------- |
| Newline | Editor | `Control + Enter` |
| Newline | Editor | `Shift + Enter` |
| Newline below | Editor | `Control + Shift + Enter` |
#### Pane
| **Command** | **Target** | **Default Shortcut** |
| ----------------------------- | -------------- | ----------------------- |
| Activate item 1 | Pane | `Control + 1` |
| Activate item 2 | Pane | `Control + 2` |
| Activate item 3 | Pane | `Control + 3` |
| Activate item 4 | Pane | `Control + 4` |
| Activate item 5 | Pane | `Control + 5` |
| Activate item 6 | Pane | `Control + 6` |
| Activate item 7 | Pane | `Control + 7` |
| Activate item 8 | Pane | `Control + 8` |
| Activate item 9 | Pane | `Control + 9` |
| Activate last item | Pane | `Control + 0` |
| Activate next item | Pane | `Alt + ⌘ + Right` |
| Activate next item | Pane | `⌘ + }` |
| Activate prev item | Pane | `Alt + ⌘ + Left` |
| Activate prev item | Pane | `⌘ + {` |
| Close active item | Pane | `⌘ + W` |
| Close all items | Pane | `⌘ + K, ⌘ + W` |
| Close clean items | Pane | `⌘ + K, U` |
| Close inactive items | Pane | `Alt + ⌘ + T` |
| Go back | Pane | `Control + ` |
| Go forward | Pane | `Control + _` |
| Reopen closed item | Pane | `⌘ + Shift + T` |
| Split down | Pane | `⌘ + K, Down` |
| Split left | Pane | `⌘ + K, Left` |
| Split right | Pane | `⌘ + K, Right` |
| Split up | Pane | `⌘ + K, Up` |
| Toggle filters | Project Search | `Alt + ⌘ + F` |
| Toggle focus | Project Search | `⌘ + F` |
| Toggle focus | Project Search | `⌘ + Shift + F` |
| Activate regex mode | Search | `Alt + ⌘ + G` |
| Activate text mode | Search | `Alt + ⌘ + X` |
| Cycle mode | Search | `Alt + Tab` |
| Select all matches | Search | `Alt + Enter` |
| Select next match | Search | `⌘ + G` |
| Select prev match | Search | `⌘ + Shift + G` |
| Toggle case sensitive | Search | `Alt + ⌘ + C` |
| Toggle replace | Search | `⌘ + Shift + H` |
| Toggle whole word | Search | `Alt + ⌘ + W` |
| Close inactive tabs and panes | Workspace | `Control + Alt + ⌘ + W` |
#### Buffer Search Bar
| **Command** | **Target** | **Default Shortcut** |
| ---------------------- | ------------- | -------------------- |
| Dismiss | Buffer Search | `Escape` |
| Focus editor | Buffer Search | `Tab` |
| Cycle mode | Search | `Alt + Tab` |
| Focus search | Search | `⌘ + F` |
| Next history query | Search | `Down` |
| Previous history query | Search | `Up` |
| Replace all | Search | `⌘ + Enter` |
| Replace next | Search | `Enter` |
| Select all matches | Search | `Alt + Enter` |
| Select next match | Search | `Enter` |
| Select prev match | Search | `Shift + Enter` |
| Toggle replace | Search | `⌘ + Alt + F` |
#### Workspace
| **Command** | **Target** | **Default Shortcut** |
| -------------------------------- | ----------------- | ----------------------- |
| Toggle focus | Assistant | `⌘ + ?` |
| Open recent | Branches | `Alt + ⌘ + B` |
| Toggle | Command Palette | `⌘ + Shift + P` |
| Deploy | Diagnostics | `⌘ + Shift + M` |
| Toggle | File Finder | `⌘ + P` |
| Toggle | Language Selector | `⌘ + K, M` |
| Deploy search | Pane | `⌘ + Shift + F` |
| Deploy search | Pane | `⌘ + Shift + H` |
| Toggle focus | Project Panel | `⌘ + Shift + E` |
| Toggle | Project Symbols | `⌘ + T` |
| Open recent | Projects | `Alt + ⌘ + O` |
| Toggle | Tab Switcher | `Control + Shift + Tab` |
| Toggle | Tab Switcher | `Control + Tab` |
| Rerun | Task | `Alt + T` |
| Spawn | Task | `Alt + Shift + T` |
| Toggle focus | Terminal Panel | ``Control + ` `` |
| Toggle | Theme Selector | `⌘ + K, ⌘ + T` |
| Activate pane 1 | Workspace | `⌘ + 1` |
| Activate pane 2 | Workspace | `⌘ + 2` |
| Activate pane 3 | Workspace | `⌘ + 3` |
| Activate pane 4 | Workspace | `⌘ + 4` |
| Activate pane 5 | Workspace | `⌘ + 5` |
| Activate pane 6 | Workspace | `⌘ + 6` |
| Activate pane 7 | Workspace | `⌘ + 7` |
| Activate pane 8 | Workspace | `⌘ + 8` |
| Activate pane 9 | Workspace | `⌘ + 9` |
| Activate pane in direction down | Workspace | `⌘ + K, ⌘ + Down` |
| Activate pane in direction left | Workspace | `⌘ + K, ⌘ + Left` |
| Activate pane in direction right | Workspace | `⌘ + K, ⌘ + Right` |
| Activate pane in direction up | Workspace | `⌘ + K, ⌘ + Up` |
| Close all docks | Workspace | `Alt + ⌘ + Y` |
| New file | Workspace | `⌘ + N` |
| New terminal | Workspace | `Control + ~` |
| New window | Workspace | `⌘ + Shift + N` |
| Save | Workspace | `⌘ + S` |
| Save all | Workspace | `⌘ + Alt + S` |
| Save as | Workspace | `⌘ + Shift + S` |
| Save without format | Workspace | `⌘ + K, S` |
| Swap pane in direction | Workspace | `⌘ + K, Shift + Down` |
| Swap pane in direction | Workspace | `⌘ + K, Shift + Left` |
| Swap pane in direction | Workspace | `⌘ + K, Shift + Right` |
| Swap pane in direction | Workspace | `⌘ + K, Shift + Up` |
| Toggle bottom dock | Workspace | `⌘ + J` |
| Toggle left dock | Workspace | `⌘ + B` |
| Toggle right dock | Workspace | `⌘ + R` |
| Unfollow | Workspace | `Escape` |
| Open keymap | Zed | `⌘ + K, ⌘ + S` |
#### Project Panel
| **Command** | **Target** | **Default Shortcut** |
| ----------------------- | ------------- | --------------------- |
| Collapse selected entry | Project Panel | `Left` |
| Copy | Project Panel | `⌘ + C` |
| Copy path | Project Panel | `⌘ + Alt + C` |
| Copy relative path | Project Panel | `Alt + ⌘ + Shift + C` |
| Cut | Project Panel | `⌘ + X` |
| Delete | Project Panel | `Backspace` |
| Delete | Project Panel | `Delete` |
| Delete | Project Panel | `⌘ + Backspace` |
| Delete | Project Panel | `⌘ + Delete` |
| Expand selected entry | Project Panel | `Right` |
| New directory | Project Panel | `Alt + ⌘ + N` |
| New file | Project Panel | `⌘ + N` |
| New search in directory | Project Panel | `Alt + Shift + F` |
| Open | Project Panel | `Space` |
| Paste | Project Panel | `⌘ + V` |
| Rename | Project Panel | `Enter` |
| Rename | Project Panel | `F2` |
| Reveal in finder | Project Panel | `Alt + ⌘ + R` |
#### Project Search Bar
| **Command** | **Target** | **Default Shortcut** |
| ---------------------- | -------------- | -------------------- |
| Search in new | Project Search | `⌘ + Enter` |
| Toggle focus | Project Search | `Escape` |
| Activate regex mode | Search | `Alt + ⌘ + G` |
| Activate text mode | Search | `Alt + ⌘ + X` |
| Cycle mode | Search | `Alt + Tab` |
| Focus search | Search | `⌘ + Shift + F` |
| Next history query | Search | `Down` |
| Previous history query | Search | `Up` |
| Replace all | Search | `⌘ + Enter` |
| Replace next | Search | `Enter` |
| Toggle replace | Search | `⌘ + Shift + H` |
#### Terminal
| **Command** | **Target** | **Default Shortcut** |
| --------------------------- | ---------- | --------------------- |
| Clear | Terminal | `⌘ + K` |
| Copy | Terminal | `⌘ + C` |
| Delete line | Terminal | `⌘ + Backspace` |
| Move to beginning of line | Terminal | `⌘ + Left` |
| Move to end of line | Terminal | `⌘ + Right` |
| Move to next word end | Terminal | `Alt + Right` |
| Move to previous word start | Terminal | `Alt + Left` |
| Paste | Terminal | `⌘ + V` |
| Show character palette | Terminal | `Control + ⌘ + Space` |
#### Assistant Editor
| **Command** | **Target** | **Default Shortcut** |
| ------------------ | ---------- | -------------------- |
| Assist | Assistant | `⌘ + Enter` |
| Cycle message role | Assistant | `Control + R` |
| Quote selection | Assistant | `⌘ + >` |
| Split | Assistant | `Shift + Enter` |
| Save | Workspace | `⌘ + S` |

View file

@ -0,0 +1,40 @@
# Remote Development
Remote Development is in the early stages of development. If you'd like to try it please email [alpha@zed.dev](mailto:alpha@zed.dev).
Remote Development allows you to code at the speed of thought, even when your codebase is not on your local machine. You use Zed locally so the UI is immediately responsive, but offload heavy computation to the development server so that you can work effectively.
## Overview
Remote development requires running two instances of Zed. A headless instance on the remote machine, and the editor interface on your local computer. All configuration is done on your local computer, except for starting the headless instance.
Currently the two instances connect via Zed's servers, but we intend to build peer to peer communication in the future.
## Setup
> NOTE: You must be in the alpha program to see this UI. The instructions will likely change as the feature gets closer to launch.
1. Open the projects dialog with `cmd-option-o` and then click "Connect…".
2. Click "Add Server"
3. Give it a name, and copy the instructions given.
4. On the remote machine, install Zed
```
curl https://zed.dev/install.sh | bash
```
5. On the remote machine, paste the instructions from step 3.
> NOTE: Currently you must keep this process open. We are working on making it background itself.
6. On your laptop you can now open folders on the remote machine.
> NOTE: Zed does not currently handle opening very large directories (e.g. `/` or `~` that may have >100,000 files) very well. We are working on improving this, but suggest in the meantime opening only specific projects, or subfolders of very large mono-repos.
## Known Limitations
- The Terminal does not work remotely.
- You cannot spawn Tasks remotely.
- Extensions aren't yet supported in headless Zed.
## Feedback
- Please join the [#remoting-feedback](https://discord.com/channels/869392257814519848/1235290452270387241) Discord channel.

View file

@ -4,6 +4,19 @@
Zed collects anonymous telemetry data to help the team understand how people are using the application and to see what sort of issues they are experiencing.
## Configuring Telemetry Settings
You have full control over what data is sent out by Zed. To enable or disable some or all telemetry types, open your `settings.json` file via `zed: open settings` from the command palette. Insert and tweak the following:
```json
"telemetry": {
"diagnostics": false,
"metrics": false
},
```
The telemetry settings can also be configured via the `welcome` screen, which can be invoked via the `workspace: welcome` action in the command palette.
## Dataflow
Telemetry is sent from the application to our servers. Data is proxied through our servers to enable us to easily switch analytics services. We currently use:
@ -129,17 +142,6 @@ The following data is sent:
You can audit the metrics data that Zed has reported by running the command `zed: open telemetry log` from the command palette, or clicking `Help > View Telemetry Log` in the application menu.
### Configuring Telemetry Settings
You have full control over what data is sent out by Zed. To enable or disable some or all telemetry types, open your `settings.json` file via `zed: open settings` from the command palette. Insert and tweak the following:
```json
"telemetry": {
"diagnostics": false,
"metrics": false
},
```
The telemetry settings can also be configured via the `welcome` screen, which can be invoked via the `workspace: welcome` action in the command palette.
### Concerns and Questions

72
docs/src/themes.md Normal file
View file

@ -0,0 +1,72 @@
---
title: Themes
slug: themes
short_summary: Explanation of Zed's theme system, including UI and syntax themes
section: using-zed
---
Zed themes and their underlying systems are undergoing significant development. They should not be considered stable or final. Note that themes are subject to change or removal as the theme system moves towards a stable version.
A Zed Theme refers to and affects both the UI and the syntax highlighting of Zed.
We will not have separate UI and syntax themes the like Atom, but will provide a way to override syntax styles (and more) from a single theme.
---
A variety of Zed flavoured ports of various syntax themes are available in Zed. These are mostly placeholders while we develop the system and develop our own themes. It is likely the themes that exist today in Zed will be converted into community themes in the future when we ship user-creatable themes.
## Choosing a Theme
You can choose a theme in Zed a few ways:
- by pressing `CMD + K` then `CMD + T`
- by typing `theme` in the command palette
- by editing your `settings.json` with a specific theme name:
```json
{
"theme": "Ayu Mirage"
}
```
You can also use different themes based on system preferences:
```
{
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark"
}
}
```
---
## Theme Philosophy
The theme you use in your editor is deeply personal. Whether it is focused utterly on function, or just an aesthetic that you enjoy, ultimately, a theme should be a reflection of what is important to you.
We want to provide the right balance of good defaults and a powerful toolkit to make your editor your own.
In practice, this means:
- **Default Themes**: We want to provide a set of themes that are beautiful, usable and accessible out of the box. Additionally, we would love to provide default versions of prominent themes that developers are already familiar with where possible.
- **Powerful Customization**: We want to provide a way to customize your theme to your heart's content. This could mean taking a default theme and just changing a few colors, or it could mean creating your own theme from scratch.
- **Community**: We want to enable the community to create and share their themes. We will provide a way to load themes into Zed, and a toolkit for building themes.
- **Accessibility**: We want to ensure that the default themes are accessible to all users. We will also provide guardrails for you to ensure that your custom themes are accessible. We won't, however, require you to make your theme accessible. We may tag themes that don't meet our accessibility standards as such, but we won't prevent you from using or sharing them.
We want you to have the flexibility to express yourself while ensuring the editor remains a functional tool. We're working hard to create a theme system that strikes the right balance between customization and usability.
### Accessibility in Themes
Currently, many of Zed's themes are largely inaccessible. We are working on a new accessible theme system, which will launch with Zed 1.0
A11y (accessibility) in Zed will be a long project. Likely lasting far beyond 1.0. Due to GPUI being written from the ground up we don't have access to the same a11y features that Swift, Web-based apps or [insert other language] does.
Making Zed accessible will be a joint effort between things on the Zed side, and building out features in GPUI.
For now, you can join this discussion to talk further about a11y in Zed: [Accessibility (a11y) in Zed](https://github.com/zed-industries/zed/discussions/1297)

View file

@ -13,9 +13,7 @@
Liberation Mono, Courier New, monospace;
--code-font-size: 0.875em
/* please adjust the ace font size accordingly in editor.js */;
}
.light {
--bg: rgb(246, 245, 240);
--fg: rgb(75, 83, 97);
--title-color: rgb(8, 76, 207);