Search and Replace Across a Markdown Project
Search and Replace Across a Markdown Project
Use workspace search when you know the words inside a document but not its filename. Markdown Explorer searches the files in the folder you opened and groups results by file and line.
Open workspace search
- macOS:
Cmd + Shift + F - Windows and Linux:
Ctrl + Shift + F
Enter a word or phrase. The first version of project search focuses on Markdown, text, and HTML content rather than acting as a general source-code indexer.
For example, search for:
legacy endpointThe result list shows each matching file, the line number, and a preview with the matching range emphasized. Select a result to open the file. Markdown Explorer expands its parent folders and scrolls the Explorer to the file so you keep the project context.
Narrow the results
Use the available options when a plain text search is too broad:
- Match case distinguishes
APIfromapi. - Regular expression supports pattern-based searches.
- Empty or whitespace-only searches are ignored.
- Patterns that match an empty string are not executed across the workspace.
A regular expression such as the following finds level-two headings that start with a release number:
^##\s+v\d+\.\d+Replace carefully
Replace one result when you want to inspect every change. Replace All requires confirmation because it writes to multiple project files.
A useful migration flow is:
- Search for the old term.
- Open representative results from different folders.
- Enable Match case or a regular expression if needed.
- Replace one result and verify the Markdown preview.
- Use Replace All only after the scope looks correct.
Workspace search does not currently match across block boundaries. Search for a smaller phrase if part of the text is in a heading and the rest is in a paragraph.
If you already know the filename, Quick Open is the faster tool.