Skip to content

Spectreλ︎

Space s s to toggle Spectre (open/close) to search and replace tool.

? for the Spectre key mappings

Neovim Spectre key mappings

Search & Replaceλ︎

i underneath Search and enter a search pattern, Esc to see resuts in a popup below.

i underneath Replace and enter a replace pattern, Esc to see in-line diff results

v toggles Spectre results view between diff to search to replace view

Neovim Spectre search replace Neovim Spectre search replace

d d to toggle an occurance

R replaces all occurances (after selecting the occurances to change)

A DONE checkbox is show at then end of each selection which has been reaplaced

To replace single occurance, toggle all occurances that should not be changes and press R

Neovim Spectre search replace done Neovim Spectre search replace done

Spectre does not undo changes

Use Git or Neovim undo to rollback changes made by Spectre.

🌐 Spectre is available via the AstroNvim Community project pack and included in the Practicalli astronvim-config

🌐 ripgrep and 🌐 sed are required.

Spectre project