Searching Projects

SPC / will do a fuzzy logic search of all the files in the current project. A helm pop-up displays and allows you to type in a search term.

Spacemacs Helm-Ag ripgrep pattern search results

Use C-j and C-k to move down and up through the search results.

RET selects the search result and shows the file and line in the current buffer.

Requirements - ripgrep search tool

Searching requires an external tool to be available on your system PATH. Ripgrep is the recommended search tool, although you can use silver searcher (ag) and grep.

Ripgrep install instructions

Searching specific files

To narrow the results you can specify a filename extension that you want to search through or ignore.

Ripgrep takes the -g option for a filename to search (globbing), or -g! for a filename to ignore.

-g*.clj map shows only results of searching for map from files ending in .clj

Spacemacs Helm-Ag ripgrep globbing .clj files

-g!*.md map will search for map for all files except those ending in .md

Spacemacs Helm-Ag ripgrep globbing not .md files


results matching ""

    No results matching ""