---
title: Keyboard Shortcuts
description: macOS keyboard shortcuts for Ghostty tabs and splits, and Zed (with imported VS Code keybindings) editing, search, and mass replacement.
tokens: ~396
---

# Keyboard Shortcuts

Personal setup: Ghostty for the terminal, Zed for the editor. These are stock defaults, not custom keybindings. Line-editing keys like Ctrl+A live in [Terminal 101](/docs/other/terminal-basics).

## Ghostty

Ghostty labels ⌘+D as "split right" (new pane beside the current one) and ⌘+⇧+D as "split down" (new pane below).

```text
⌘ + T                                    # new tab
⌘ + W                                    # close current split (last split closes the tab)
⌘ + 1–9                                  # switch to the nth tab (⌘ + 9 = last)

⌘ + D                                    # new split, vertical
⌘ + ⇧ + D                                # new split, horizontal
⌘ + ⌥ + ← ↑ → ↓                          # move focus to the split in that direction
```

### Remote sessions

If backspace or backslash behave incorrectly when SSH'd into a remote server from Ghostty, set the terminal type on the remote host. Add to `~/.zshrc` (or `~/.bashrc`) on the server:

```bash
export TERM=xterm-256color
```

## Zed (VS Code keymap)

```text
⌘ + X                                    # cut the current line (nothing selected)

⌘ + P                                    # go to file
⌘ + ⇧ + P                                # command palette
⌘ + F                                    # find in the current file
⌘ + ⇧ + F                                # search across files
⌘ + W                                    # close current editor tab

⌃ + `                                    # toggle terminal
⌘ + B                                    # toggle left dock (file tree)
```