Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions tips/agent-context-menu.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Agent Context Menu for Quick Additions
subtitle: Add context to agent with mouse-friendly dropdown menu
category: ai
difficulty: beginner
tags:
- agent
- context
- ui
prUrl: 'https://github.com/zed-industries/zed/pull/47768'
Comment thread
godruoyi marked this conversation as resolved.
mediaType: image
Comment thread
godruoyi marked this conversation as resolved.
mediaUrl: 'https://cat.zed.tips/2026-02-05/agent-context-menu-e38c2ff5.png'
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

The agent panel now includes a **context menu** accessed via the `+` button, making it easier to add context with your mouse instead of typing `@` mentions.

## What's in the Menu

The `+` dropdown displays all available context options:
- **@mentions**: Files, diagnostics, selections, etc.
- **Images**: Attach screenshots or images
- **Selections**: Include selected code
- **Future features**: Skills and custom context (coming soon)

## How to Use

1. Click the `+` button in the agent message editor
2. Browse available context options in the dropdown
3. Select the context you want to add
4. Context is automatically inserted into your message

All menu options are also available by typing `@` in the message editor.

## Why This Matters

**Discoverability**: See all available context types without memorizing `@` commands.

**Mouse-friendly**: Add context without switching to keyboard.

**Visual feedback**: Preview what context is available before adding.

This menu serves as foundation for upcoming features like custom skills and advanced context management.
48 changes: 48 additions & 0 deletions tips/hot-exit-empty-workspaces.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Hot-Exit for Empty Workspaces
subtitle: Unsaved files in empty workspaces now restore on startup
category: productivity
difficulty: beginner
tags:
- workspace
- autosave
- workflow
prUrl: 'https://github.com/zed-industries/zed/pull/46557'
Comment thread
godruoyi marked this conversation as resolved.
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Empty workspaces (without folders) now support **hot-exit**, automatically restoring unsaved files like drafts and single files when you restart Zed.

## What This Means

Previously, closing Zed with unsaved files in an empty workspace would lose those files. Now they're preserved and restored on next launch.

**Protected content:**
- Unsaved draft files
- Single files opened without a project folder
- Scratch buffers with content

Empty workspaces are identified by `workspace_id` rather than file paths, allowing multiple empty workspaces to coexist and restore independently.

## How It Works

No configuration needed - hot-exit is automatic:

1. Open Zed without a project folder
2. Create or edit files without saving
3. Close Zed
4. Reopen Zed
5. Your unsaved work is restored

## Why This Matters

**No lost work**: Close Zed confidently knowing unsaved files will return.

**Scratch workflow**: Use Zed for quick notes and drafts without worrying about saving.

**Session continuity**: Pick up exactly where you left off, even in empty workspaces.

Perfect for users who frequently work with single files or use Zed as a quick scratchpad without opening project folders.
49 changes: 49 additions & 0 deletions tips/image-viewer-zoom-pan.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Zoom and Pan in Image Viewer
subtitle: Navigate large images with scroll-wheel zoom and click-drag panning
category: productivity
difficulty: beginner
tags:
- image-viewer
- navigation
- shortcuts
prUrl: 'https://github.com/zed-industries/zed/pull/43944'
Comment thread
godruoyi marked this conversation as resolved.
mediaType: video
Comment thread
godruoyi marked this conversation as resolved.
mediaUrl: 'https://cat.zed.tips/2026-02-05/image-viewer-zoom-pan-0b083855.mp4'
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Zed's image viewer now supports **zooming and panning** to help you inspect images in detail. Use scroll-wheel zoom, toolbar controls, or keyboard shortcuts to navigate large images efficiently.

## Available Actions

**Zoom Controls:**
- Scroll wheel + modifier key to zoom in/out
- Toolbar buttons for zoom in/out
- `zoom-to-actual` - View at 100% size
- `fit-to-view` - Fit entire image in viewport
- `reset` - Reset zoom level

**Panning:**
- Click and drag to pan around zoomed images
- Zoom percentage overlay shows current zoom level

## Why This Matters

**Image inspection**: Examine design details, screenshots, or diagrams closely.

**Navigation**: Easily move around large images without scrolling.

**Workflow efficiency**: Quick zoom controls make image review faster.

## How to Use

1. Open any image file in Zed
2. Use scroll wheel while holding modifier key to zoom
3. Click and drag to pan around the zoomed image
4. Use toolbar controls or command palette for zoom actions

The zoom percentage overlay appears automatically to show your current zoom level.
57 changes: 57 additions & 0 deletions tips/reopen-with-encoding.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Reopen Files with Different Encoding
subtitle: Fix garbled text by selecting the correct encoding from status bar
category: productivity
difficulty: beginner
tags:
- encoding
- files
- internationalization
prUrl: 'https://github.com/zed-industries/zed/pull/46553'
Comment thread
godruoyi marked this conversation as resolved.
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Fix **garbled text** caused by incorrect encoding detection by using the "Reopen with Encoding" feature. Select from Shift JIS, EUC-JP, UTF-16LE, and other encodings to properly display your files.

## How to Use

**Via Status Bar (Click):**
1. Click the encoding indicator in the status bar (e.g., "UTF-8")
2. Select desired encoding from the picker
3. File reloads with the new encoding

**Via Keyboard Shortcut:**
- macOS: `Cmd-K N`
- Linux/Windows: `Ctrl-K N`

**Via Command Palette:**
- Search for "Reopen with Encoding"

## Available Encodings

The picker includes common encodings:
- UTF-8, UTF-16LE, UTF-16BE
- Shift JIS (Japanese)
- EUC-JP (Japanese)
- GB2312, GBK (Chinese)
- And many more...

## Why This Matters

**Fix mojibake**: Resolve garbled characters in legacy files.

**International files**: Properly display files created with different system encodings.

**BOM handling**: Automatically handles byte order marks (BOM) when switching encodings.

## Limitations

Currently works for **local files only**. The feature is disabled when:
- In collaboration sessions (shared projects)
- Connected to remote servers (SSH/WSL)
- File has unsaved changes (to prevent data loss)

When switching back to UTF-8, BOMs are properly detected and consumed to restore original file state.
57 changes: 57 additions & 0 deletions tips/syntax-node-selection.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Extend Selection to Syntax Nodes
subtitle: Select to syntax node boundaries for precise code selection
category: navigation
difficulty: intermediate
tags:
- selection
- editing
- navigation
prUrl: 'https://github.com/zed-industries/zed/pull/47571'
Comment thread
godruoyi marked this conversation as resolved.
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Use **syntax node selection commands** to extend your selection to the start or end of larger syntax nodes, making it easy to select complete code structures precisely.

## Available Commands

Two new commands extend selections to syntax boundaries:

- `editor: select to start of larger syntax node` - Extend selection backward to syntax node start
- `editor: select to end of larger syntax node` - Extend selection forward to syntax node end

These complement the existing `move to {start,end} of larger syntax node` commands, but extend selections instead of moving the cursor.

## How to Use

1. Place cursor in your code
2. Run one of the selection commands via command palette
3. Selection extends to the nearest syntax node boundary
4. Repeat to expand to larger nodes

## Setup Keybindings

Add to your `keymap.json`:

```json
{
"context": "Editor",
"bindings": {
"alt-shift-[": "editor::SelectToStartOfLargerSyntaxNode",
"alt-shift-]": "editor::SelectToEndOfLargerSyntaxNode"
}
}
```

## Why This Matters

**Precise selection**: Select exactly to code structure boundaries (functions, blocks, expressions).

**Structural editing**: Work with code semantically rather than by lines or words.

**Emacs-like workflow**: Similar to Emacs `mark-sexp` for S-expression selection.

Perfect for structural code refactoring and editing operations that need to respect syntax boundaries.
46 changes: 46 additions & 0 deletions tips/terminal-tab-rename.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Rename Terminal Tabs
subtitle: Organize terminals by renaming tabs via right-click or double-click
category: productivity
difficulty: beginner
tags:
- terminal
- organization
- workflow
prUrl: 'https://github.com/zed-industries/zed/pull/45800'
Comment thread
godruoyi marked this conversation as resolved.
mediaType: video
Comment thread
godruoyi marked this conversation as resolved.
mediaUrl: 'https://cat.zed.tips/2026-02-05/terminal-tab-rename-ef31410b.mp4'
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Keep your terminal sessions organized by **renaming terminal tabs**. Give each terminal a meaningful name to quickly identify different tasks like "server", "tests", or "git".

## How to Rename

**Right-click method:**
1. Right-click on any terminal tab
2. Select "Rename" from context menu
3. Enter new name and press Enter

**Double-click method:**
1. Double-click on the terminal tab title
2. Enter new name and press Enter

## Why This Matters

**Organization**: Distinguish between multiple terminal sessions at a glance.

**Workflow clarity**: Name terminals by their purpose (e.g., "npm run dev", "docker logs").

**Context switching**: Quickly find the right terminal when juggling multiple tasks.

## Example Use Cases

- Name terminals by project component: "frontend", "backend", "database"
- Label by task type: "tests", "build", "deploy"
- Identify long-running processes: "dev server", "file watcher"

Terminal tab names persist within your session, making it easier to maintain context across your workflow.
66 changes: 66 additions & 0 deletions tips/vim-gdefault-setting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Vim Global Substitution Default
subtitle: Make /g the default for substitute commands with vim.gdefault
category: vim
difficulty: intermediate
tags:
- vim
- substitution
- settings
prUrl: 'https://github.com/zed-industries/zed/pull/47664'
Comment thread
godruoyi marked this conversation as resolved.
publishedAt: '2026-02-05'
updatedAt: '2026-02-05'
author: godruoyi
authorUrl: 'https://github.com/godruoyi'
---

Enable **vim.gdefault** to make `/g` (replace all matches in a line) the default behavior for Vim substitute commands, eliminating the need to type `/g` every time.

## How It Works

With `vim.gdefault` enabled, the `/g` flag behavior is inverted:

| Command | gdefault ON | gdefault OFF |
|---------|-------------|--------------|
| `:s///` | Replace all | Replace one |
| `:s///g` | Replace one | Replace all |
| `:s///gg` | Replace all | Replace one |
Comment thread
godruoyi marked this conversation as resolved.

## Configuration

Add to your `settings.json`:

```json
{
"vim": {
"gdefault": true
}
}
```

Or use Vim commands in editor:
- `:set gdefault` (short: `:set gd`) - Enable
- `:set nogdefault` (short: `:set nogd`) - Disable

## Why This Matters

**Efficiency**: Most substitutions replace all matches - make it the default.

**Muscle memory**: If you're used to Vim with `gdefault`, maintain your workflow.

**Less typing**: Skip `/g` on every substitute command.

## Example

Without gdefault:
```vim
:s/foo/bar/g " Need /g to replace all
```

With gdefault:
```vim
:s/foo/bar " Replaces all by default
:s/foo/bar/g " Add /g to replace only first match
```

This setting is especially useful for users transitioning from Vim/Neovim where they've relied on `gdefault` for years.
Loading