Text Manipulation Kung Fu for the Aspiring Black Belt
Zed's cursor navigation and selection commands are built from a few composable pieces: arrow keys plus modifiers, with cmd for edge boundaries, alt for word boundaries, ctrl-alt for subwords and shift to turn a move into a selection. Four progressively harder exercises put them to use: converting a JSON key to snake case, hoisting a Python local into an upper-snake-case global constant, cleaning a CSV, and extracting actor names from Markdown into a sorted "Last, First" list. The exercises lean on multi-cursor commands like select all matches, select next and split selection into lines, alongside case-conversion and line sort/unique commands. Opening selections in a multibuffer is a quick way to review scattered selections before applying an edit.
Related posts
- Zed Weekly: #24
Zed mediumAdeptWeekly roundup from the Zed editor team covering a range of fixes and features. Gitignore handling now stops at the first .gitignore whose sibling is a .git directory, which fixes setups with a dotfiles repo in $HOME. Up/down cursor movement now uses the text layout engine's output instead of counting UTF-8 bytes, because code points and grapheme clusters still break on font fallback, double-width characters and proportional fonts. Other items include guest participants in calls, a Copilot keybind collision with typographic quotes, Tailwind autocomplete for more languages, a Vim-mode toggle command, remote terminal sharing work, and a "Retrieve Context" button that feeds semantic-index results to the inline assistant.
- Native Git support in Zed
Zed easyNoviceZed v0.177 adds native Git support built around speed, Git-native semantics and keyboard-first workflows: a Git Panel for staging and restoring, cmd-enter commits with optional LLM-written messages and automatic Co-Authored-By lines, a hunk-level Diff View like `git add -p`, and fetch/pull/push from the command palette. Under the hood, the text buffer was rebuilt so deleted hunks are part of the editor's coordinate system rather than rendered blocks, enabling search and selection inside them. Staged and unstaged hunks are interleaved by computing a "diff-of-diffs" (buffer vs HEAD compared with index vs HEAD), so focus isn't lost when staging. Conflict resolution, line-level staging and history visualization are planned next.
- Zed Weekly: #21
Zed easyNoviceWeekly team update from the Zed editor team. It covers initial Prettier integration and better LSP server log display, a storybook CLI for rendering new GPUI UI components in isolation, and Vim mode's command palette shipping to preview. Julia explains why vertical cursor movement drifts with mixed scripts, multi-codepoint graphemes like ZWJ emoji, and proportional fonts, and proposes tracking an intended pixel x-position resolved like a mouse click, which costs more compute. Other items include ClickHouse dashboard query optimization (minutes to under 10 seconds), the Semantic Index shipping to stable, cross-project following for channel notes, and CRDT Lamport-timestamp-based change notifications.
- Split Diffs are Here
Zed easyNoviceZed v0.224 makes split diffs the default, built on its multibuffer model where all changed files form one editable surface. The left side reuses the old file version with deleted hunks highlighted, keeping its syntax tree and line numbers. The block map inserts spacers that keep both sides aligned on every keystroke. Profiling large diffs produced broader wins than the split-diff-specific work: block map fixes also sped up project search, and switching from fork/exec to posix_spawn on macOS reduced main-thread hangs from git blame and other external processes.
- Building a Text Editor in the Times of AI
Zed easyNoviceZed's co-founders Nathan, Max and Antonio describe how they use AI for programming. They prefer chat-style assistants with stronger models over Copilot's per-keystroke completions, and say supplying the right context is the main obstacle in a large Rust codebase. Zed's inline assist renders LLM output as live edits using a streaming diff based on a modified Needleman-Wunsch algorithm, with a cost function that favours insertions and deletions and a small lookahead. They adopted this after function-calling approaches failed to produce reliable precise edit locations. The conversation also covers plans for AI features in Zed.