Everywhere
| Keys | Action |
|---|---|
| F7 or Alt+↓ | Next difference (next conflict in a merge) |
| Shift+F7 or Alt+↑ | Previous difference (previous conflict in a merge) |
| Ctrl+T | New tab (Home) |
| Ctrl+W or Ctrl+F4 | Close the tab (asks first if there are unsaved changes) |
| Ctrl+Tab / Ctrl+Shift+Tab | Next / previous tab (also Ctrl+PageDown / Ctrl+PageUp) |
| Ctrl+1 … Ctrl+8, Ctrl+9 | Go to tab 1 to 8, or the last tab |
| Ctrl+Shift+Home | Go to Home |
| Ctrl+Shift+P | Command palette: run any command by name |
| Ctrl+P | Quick Open: a recent comparison or a saved session |
| Ctrl+/ | Show every keyboard shortcut, searchable |
| Ctrl+, | Settings |
| Ctrl+Plus / Ctrl+Minus / Ctrl+0 | Zoom in / out / reset |
| Ctrl+Shift+N, Ctrl+Shift+W | New window, close the window |
| Alt+F, E, V, N, M, O, P, T, H | Open the File, Edit, View, Navigate, Merge, Folder, Patch, Tools or Help menu |
The menu bar shows every command with its current shortcut, and toolbar tooltips show the same keys.
Custom keys
The keys on this page are the ones DiffScope uses. The menus always show the keys that are active, and Ctrl+/ lists them all, searchable.
To change single commands, add keys.overrides to settings.json (in %APPDATA%\DiffScope on Windows, ~/.config/DiffScope on Linux). Map a command to one or more keys, or to null to unbind it. Two-stroke chords such as Ctrl+K Ctrl+R are allowed:
{
"keys.overrides": {
"diff.next": ["Ctrl+J"],
"file.reload": null,
"diff.copyRightAdvance": ["Ctrl+K Ctrl+R"]
}
}
The command names are listed in the command palette and in the menus’ tooltips. The Alt menu keys above are never bound to commands.
Home screen
| Keys / mouse | Action |
|---|---|
| Ctrl+O | Compare files: pick two files |
| Ctrl+Shift+O | Compare folders |
| Ctrl+Shift+M | Set up a 3-way merge |
| Ctrl+Shift+H | Hex compare |
| Ctrl+Shift+V | Compare two pasted texts |
| Ctrl+K | Search the recent comparisons |
| Enter / Ctrl+Enter | Open the selected recent comparison here / in a new window |
| Ctrl+D | Pin or unpin it |
| Delete | Remove it from the recent list |
| F2 | Rename the selected saved session |
| F6 | Move the focus between the welcome tour and the page |
| Drop files on the window | Two compare, three set up a merge (see Drag and drop) |
Text compare
| Keys / mouse | Action |
|---|---|
| F7 or Alt+↓ | Next difference |
| Shift+F7 or Alt+↑ | Previous difference |
| Alt+Home / Alt+End | First / last difference |
| Alt+Enter | Bring the current difference back into view |
| Alt+→ | Copy the current difference to the right |
| Alt+← | Copy the current difference to the left |
| Ctrl+Alt+→ / Ctrl+Alt+← | Copy to the right / left and go to the next difference |
| Ctrl+F, Ctrl+H | Find, find and replace |
| F3 / Shift+F3 | Next / previous match |
| Ctrl+G | Go to line (123, L12, R40, +10, $) |
| Alt+A | Align the caret lines of both sides (sync point) |
| Ctrl+Alt+J | Go to the other copy of a moved block |
| Alt+F2 | Accessible diff viewer |
| Ctrl+S | Save the edited side(s) |
| Ctrl+Z / Ctrl+Y or Ctrl+Shift+Z | Undo / redo |
| F5 | Reload both files from disk |
| Ctrl+Home / Ctrl+End | Go to the top / bottom |
| Arrow buttons in the middle gutter | Copy that difference right or left |
| Click or drag in the overview strip | Jump to that part of the file |
3-way merge
| Keys / mouse | Action |
|---|---|
| F8 / Shift+F8 | Next / previous conflict (unresolved first) |
| Alt+1 | Use mine |
| Alt+2 | Use theirs |
| Alt+3 | Mine, then theirs |
| Alt+4 | Theirs, then mine |
| Alt+5 | Use base |
| Alt+0 | Mark the conflict unresolved again |
| Ctrl+Alt+M | Magic wand: resolve a conflict where each side changed different words |
| Ctrl+Alt+Enter | Pick / unpick the caret line of an input pane |
| Alt+F8 | Next change hidden by the ignore options |
| Ctrl+S | Save the merge result |
| Ctrl+Z / Ctrl+Y | Undo / redo resolutions and edits |
| Shift+click Mine, Theirs, … or Base | Apply to every remaining unresolved conflict (also in the Merge menu) |
| Click a line number in Mine, Theirs or Base | Pick that line into the output (inside a conflict) |
| Double-click a conflict in Mine or Theirs | Take that side |
| Drag the bar above the output | Resize the panes |
Folder compare
| Keys / mouse | Action |
|---|---|
| F7 or Alt+↓ / Shift+F7 | Next / previous differing row (expands folders as needed) |
| ↑ / ↓, Page Up / Page Down | Move the selection |
| → / ← | Expand / collapse the folder |
| Enter or double-click | Open the selected file pair in a new tab (folders expand or collapse) |
| Ctrl+double-click | Open the pair in a new window |
| F3 | Peek pane: show the selected pair under the tree |
| Ctrl+F | Filter the tree by name |
| Ctrl+Shift+→ / Ctrl+Shift+← | Copy the selection to the right / left |
| F2 | Rename |
| Delete / Shift+Delete | Delete to the recycle bin / permanently (asks first) |
| Ctrl+Z | Undo the last file operation |
| F5 | Scan both folders again |
Hex compare
| Keys / mouse | Action |
|---|---|
| F7 or Alt+↓ / Shift+F7 | Next / previous differing range |
| Ctrl+G | Go to offset (formats) |
| Ctrl+F | Find bytes (DE AD ?? EF) or text |
| F3 / Shift+F3 | Next / previous match |
| Ctrl+Home / Ctrl+End | Go to the start / end |
| F5 | Reload both files |
| Click or drag in the overview strip | Jump to that part of the files |
Table compare
| Keys | Action |
|---|---|
| F7 / Shift+F7 | Next / previous changed row |
| F8 / Shift+F8 | Next / previous changed cell |
Every command is also in the menu bar. Hover a toolbar button to see its shortcut.
