Skip to content

Immutable project search (emacs occur style) #22943

@pasunboneleve

Description

@pasunboneleve

Check for existing issues

  • Completed

Describe the feature

Zed's current Project search opens a new mutable buffer where each matching line is preceded and followed by two more adjacent lines to provide context.

Emacs's occur command opens a new immutable buffer with no context lines. Only matching lines are shown, and pressing return opens a new buffer for the file where the match was found, and the cursor on the match. The new buffer appears in split screen, so it is convenient to jump from the results buffer to the target file buffer.

This seemingly simple command makes moving between matching files extremely fast, with a human in control and unobstructed by using a mouse. It would be nice if it could be recreated in Zed.

Zed Version and System Specs

Zed: v0.169.0 (Zed Preview)
OS: Linux Wayland fedora 41
Memory: 31 GiB
Architecture: x86_64
GPU: Intel(R) UHD Graphics 630 (CFL GT2) || Intel open-source Mesa driver || Mesa 24.3.2

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

Emacs documentation on `occur

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions