Choose a search method
| What you are looking for | How |
|---|---|
| Text in the current document | Ctrl+F |
| Replacement in the current document | Ctrl+H |
| Text in the documents of a folder | Ctrl+Shift+F |
| Replacement across a folder | Ctrl+Shift+H |
| A file name | The name filter at the top of the file explorer |
| A heading in the document | F8 for the outline |
Search within a document
- Press Ctrl+F for the search bar and type what you are looking for. Text selected beforehand is put into the search field.
- Toggle Aa (match case) and .* (regular expression) as needed.
- Enter / F3 goes to the next match, Shift+Enter / Shift+F3 to the previous one.
- Esc closes the search bar.
Source mode searches the text as written, Markdown markers included. Preview mode searches the text as displayed, so **important** is found by searching for important.
Replace within a document
Press Ctrl+H in source mode, then type the search text and its replacement. Replace works one match at a time; Replace All rewrites every match in the document.
The replacement field is not shown in preview mode. Even with a regular-expression search, the replacement text is inserted exactly as typed.
Search and replace across a folder
- Press Ctrl+Shift+O and open the folder you want to search.
- Press Ctrl+Shift+F for search across files, then type what you are looking for.
- Results are grouped by file. Click a matching line to jump to that position, or middle-click to open it in a new tab.
- To replace, press Ctrl+Shift+H for the replacement field, check what will be affected and run Replace All.
The search covers .md and .markdown files in the open folder and its subfolders. Encrypted files, hidden folders, development folders such as .git and node_modules, and files larger than 32 MB are excluded. Search across files in preview mode also excludes the contents of code blocks.
Replacement across files cannot be undone. Make a backup first, or work under version control.
Files that are not open, and open files without unsaved changes, are updated directly on disk. For tabs with unsaved changes, only the editor content is updated; review the result before saving. If a replacement would introduce characters that the file’s encoding cannot represent, that file is skipped and a notification explains why.
Move by heading
Press F8 for the outline and click a heading. Alt+← returns to where you were and Alt+→ goes forward again.
To find documents by tag, or to see what links to a document, use Links, tags and favourites.