Quarry

Keyboard shortcuts

Every command is also in the command palette (Ctrl+Shift+P or F1), which shows its shortcut, and nearly all are in the menus.

Letter and digit shortcuts follow the physical key position, so they work on any keyboard layout. Ctrl+K M is a chord: press Ctrl+K, release, then press M. So are Ctrl+K S, Ctrl+K U, Ctrl+K L and Ctrl+K N.

The Id column is the command id used in macro files.

These are the built-in keys. You can change or remove the shortcut of any command, or give one to a command that has none: see Changing shortcuts.

File and tabs

KeysCommandId
Ctrl+NNew Filefile.new
Ctrl+OOpen Filefile.open
Ctrl+Shift+OOpen Folderfile.openFolder
–Close All Folders (asks first when several are open)file.closeFolder
–Trust Folder… (lets git and language servers run in a folder; see Trusted folders)file.trustFolder
Ctrl+PQuick Open Filefile.quickOpen
Ctrl+SSavefile.save
Ctrl+Shift+SSave Asfile.saveAs
Ctrl+Alt+SSave Allfile.saveAll
Ctrl+W, Ctrl+F4Close Tabfile.close (Ctrl+F4: file.closeF4)
–Close Other Tabs / Close All Tabsfile.closeOthers / file.closeAll
Ctrl+Shift+TReopen Closed Tabfile.reopenClosedTab
–Copy Path of Active File / Open to the Sidefile.copyPath / file.openToSide
–Revert Filefile.revert
Ctrl+Tab, Ctrl+Page DownNext Tabfile.nextTab (Ctrl+Page Down: file.nextTabPg)
Ctrl+Shift+Tab, Ctrl+Page UpPrevious Tabfile.prevTab (Ctrl+Page Up: file.prevTabPg)
Alt+F4Exitapp.exit
–Show in Quarry Explorerfile.showInQuarryExplorer
–Show in Windows Explorerfile.showInWindowsExplorer
–Change File Encoding…file.setEncoding
–Change Line Endings…file.setEol
–Change Tab Size…view.setTabSize
–Reopen with Encoding…file.reopenWithEncoding
–Clear Recent Filesfile.clearRecent
–Clear Recent Foldersfile.clearRecentFolders

Edit

KeysCommandId
Ctrl+ZUndoedit.undo
Ctrl+Y, Ctrl+Shift+ZRedoedit.redo
Ctrl+X / Ctrl+C / Ctrl+VCut / Copy / Paste (with nothing selected, Cut and Copy take the whole line)edit.cut / edit.copy / edit.paste
Ctrl+ASelect Alledit.selectAll
Ctrl+Shift+DDuplicate Line Downedit.duplicateLine
–Duplicate Line Upedit.duplicateLineUp
Ctrl+Shift+KDelete Lineedit.deleteLine
Alt+↑ / Alt+↓Move Line Up / Downedit.moveLineUp / edit.moveLineDown
Tab / Shift+TabIndent / Outdentedit.indent / edit.outdent
–Uppercase / Lowercase / Title Caseedit.upper / edit.lower / code.titleCase
–Wrap Selections in Quotesedit.quoteSelections
–Sort Lines Ascending / Descendingcode.sortAsc / code.sortDesc
–Reverse Linescode.reverseLines
–Remove Duplicate Linescode.dedupe
–Delete Blank Lines / Delete Empty Linescode.removeBlank / code.removeEmpty
–Trim Trailing Whitespacecode.trimTrailing
–Join Linescode.joinLines
–Number Linesedit.numberLines

Selection and multi-cursor

KeysCommandId
Ctrl+DAdd Selection to Next Find Matchedit.selectNextOccurrence
Ctrl+Shift+LSelect All Occurrencesedit.selectAllOccurrences
Alt+EnterSelect All Find Matchesedit.selectAllMatches
Ctrl+Alt+↑ / Ctrl+Alt+↓Add Cursor Above / Belowselection.addCursorAbove / selection.addCursorBelow
Alt+Shift+CToggle Column (Block) Selection Modeselection.toggleColumnMode
Alt+Shift+ISplit Block Selection into Cursorsselection.blockToCursors
Alt+dragRectangular selection–
EscBack to a single cursor–

Code

KeysCommandId
Shift+Alt+FFormat Documentcode.format
Ctrl+/Toggle Line Commentedit.toggleComment
Shift+Alt+AToggle Block Commentcode.toggleBlockComment
Ctrl+Shift+[ / Ctrl+Shift+]Fold / Unfold Regioncode.fold / code.unfold
–Fold All / Unfold Allcode.foldAll / code.unfoldAll
Ctrl+Shift+\Go to Matching Bracketcode.gotoBracket
Ctrl+K MChange Language Modecode.setLanguage
–Auto-detect Languagecode.detectLanguage
–Indentation: Convert to Spaces / Tabscode.indentToSpaces / code.indentToTabs

Find

KeysCommandId
Ctrl+FFindfind.open
Ctrl+HReplacefind.replace
F3 / Shift+F3Find Next / Previousfind.next / find.prev
Alt+LToggle Find in Selectionfind.toggleInSelection
Ctrl+Shift+FFind in Filesfind.inFiles
Ctrl+Shift+HReplace in Filesfind.replaceInFiles
–Undo Replace in Filesfind.undoReplaceInFiles
F4 / Shift+F4Next / Previous Search Resultfind.nextResult / find.prevResult
Ctrl+GGo to Linegoto.line

Inside the find bar: Enter / Shift+Enter next / previous, Alt+C / Alt+W / Alt+R / Alt+P toggle case / whole word / regex / preserve case, Ctrl+Enter insert a line break, Ctrl+Alt+Enter replace all.

View

KeysCommandId
Ctrl+Shift+P, F1Command Paletteview.commandPalette
Ctrl+BCollapse / Restore Side Panelsview.toggleSidebar
Ctrl+JToggle Bottom Panelview.togglePanel
Ctrl+\Split Editor / Close Split Editorview.splitEditor
Ctrl+1 / Ctrl+2Focus Left / Right Editor Paneview.focusLeftPane / view.focusRightPane
Ctrl+Shift+EShow Explorerview.explorer
Ctrl+Shift+JShow JSON Toolsview.json
–Show Macros / Show Scriptsview.macros / view.scripts
–Show API Requestsview.api
Ctrl+`Toggle Terminal (show the terminal panel, or hide it)terminal.toggle
Ctrl+Shift+`New Terminalterminal.new
–New Terminal Tab / Split Terminal / Kill Terminal / Kill All Terminalsterminal.newTab / terminal.split / terminal.kill / terminal.killAll
–Rename Terminal / Clear Terminal / Find in Terminalterminal.rename / terminal.clear / terminal.find
–Next Terminal / Previous Terminal / Maximize Terminal Panel / Pin Terminal Panelterminal.next / terminal.prev / terminal.maximize / terminal.pin
–Run Selected Text in Terminal / Run Active File in Terminalterminal.runSelection / terminal.runFile
–Go to Folder of Active File in Terminal / Paste Path of Active File into Terminalterminal.cdToFile / terminal.pastePath
Ctrl+,Settingsview.settings
(none)Keyboard Shortcuts… (opens the list in Settings)view.shortcuts
Alt+ZToggle Word Wrapview.toggleWrap
–Toggle Render Whitespaceview.toggleWhitespace
–Toggle Light/Dark Themeview.toggleTheme
–Theme: Systemview.themeSystem
–Theme: Lightview.themeLight
–Theme: Greyview.themeGrey
–Theme: Darkview.themeDark
Ctrl+MToggle Tab Key Moves Focusview.toggleTabFocus
Ctrl+= / Ctrl+- / Ctrl+0Zoom In / Out / Resetview.zoomIn / view.zoomOut / view.zoomReset
Ctrl + mouse wheelZoom In / Out, over an editor (can be turned off in Settings)view.zoomIn / view.zoomOut
Alt, F10Open the menu bar–
Alt+F / E / O / S / N / V / G / J / I / M / T / HOpen File / Edit / Code / Selection / Find / View / Git / JSON / Scripts / Macros / Tools / Help (the letter is underlined while Alt is held)–
–Check for Updates…help.checkUpdates
–Quarry Websitehelp.website
–Report a Problem…help.reportIssue
–About Quarryhelp.about

JSON

KeysCommandId
Ctrl+Alt+FFormat / Pretty-printjson.format
Ctrl+Alt+MMinifyjson.minify
Ctrl+Alt+VValidatejson.validate
Ctrl+Alt+PCopy Path at Cursor (dot)json.copyPath
–Copy JSONPath / JSON Pointer / Bracket Path at Cursorjson.copyJsonPath / json.copyPointer / json.copyBracket
Ctrl+Alt+CCopy Value at Cursorjson.copyValue
–Convert to CSV / Convert CSV to JSONjson.toCsv / json.fromCsv
–Copy Top-level Keysjson.copyKeys

In the JSON tree: Ctrl+C copies the value, Ctrl+Shift+C copies the path.

API requests

KeysCommandId
Enter (URL box), Ctrl+Enter (anywhere in the form)Send Requestapi.send
–Cancel Requestapi.cancel
–New Requestapi.new
–Save Request / Save Request as Newapi.save / api.saveAsNew
–Show Response in JSON Toolsapi.showInJson

In the saved-requests dropdown: ↓ or Enter opens it, ↑ / ↓ move, Enter loads, F2 renames, Delete deletes, Escape closes. API commands are never recorded into macros. See API requests.

Macros and scripts

KeysCommandId
Ctrl+Shift+RStart / Stop Recordingmacro.toggleRecord
Ctrl+Shift+MPlay Last Macromacro.playLast
–Play Last Until End of Filemacro.playToEnd
–Pause / Resume Playbackmacro.pause
Shift+EscStop Playbackmacro.stop
Ctrl+Shift+EnterRun Current Scriptscript.runActive
–Show Scripts / New Scriptscript.panel / script.new
–Script API Reference (Help menu)help.scriptApi
–Macro: Open Macrosmacro.panel

Code intelligence

These need the file's language server.

KeysCommandId
Ctrl+SpaceShow Suggestionscode.triggerSuggest
Ctrl+Shift+SpaceShow Parameter Hintscode.signatureHelp
F12Go to Definitioncode.gotoDefinition
Ctrl+F12Go to Implementationcode.gotoImplementation
–Go to Type Definitioncode.gotoTypeDefinition
Shift+F12Find All Referencescode.findReferences
F2Rename Symbolcode.renameSymbol
F8 / Shift+F8Next / Previous Problemcode.nextProblem / code.prevProblem
–Format Document with Language Servercode.formatWithServer
–Restart Language Serverscode.restartLanguageServers
–Problems (bottom panel)view.problems

Compare

KeysCommandId
–Compare Two Files…compare.files
–Compare Active File With…compare.activeWith
–Compare with Savedcompare.withSaved
–Compare with Clipboardcompare.withClipboard
–Select Active File for Compare / Compare Active File with Selectedcompare.selectForCompare / compare.withSelected
F7 / Shift+F7Next / Previous Changecompare.nextChange / compare.prevChange
–Swap Sidescompare.swap
–Toggle Inline / Side by Sidecompare.toggleInline
Ctrl+SSave the edited sidefile.save

Git

KeysCommandId
Ctrl+Shift+GShow Source Controlgit.showPanel
Alt+F5 / Shift+Alt+F5Next / Previous Change (since the last commit)git.nextChange / git.prevChange
–Show Change at Cursor / Revert Change at Cursorgit.peekChange / git.revertChange
–Compare with Last Commit (HEAD)git.compareWithHead
–Show File Historygit.fileHistory
–Show Commit Graphgit.graph
Alt+F6 / Shift+Alt+F6Next / Previous Conflictgit.nextConflict / git.prevConflict
–Accept Current / Incoming / Both (conflict at cursor)git.acceptCurrent / git.acceptIncoming / git.acceptBoth
–Accept All Current / Incoming in This Filegit.acceptAllCurrent / git.acceptAllIncoming
–Open in Merge View / Complete Merge (Merge View) / Cancel Merge View (Ctrl+S completes in a merge tab)git.openMergeView / git.completeMergeView / git.cancelMergeView
–Show / Hide Line Blamegit.toggleBlame
–Stage / Unstage Current Filegit.stageFile / git.unstageFile
Ctrl+K S / Ctrl+K UStage / Unstage Change at Cursor (in a comparison opened from Source Control)git.stageChange / git.unstageChange
Ctrl+K L / Ctrl+K NStage / Unstage Selected Linesgit.stageLines / git.unstageLines
–Discard Change at Cursor… / Discard Selected Lines… (no shortcut on purpose)git.discardChange / git.discardLines
–Switch Branch…git.switchBranch
–Fetch / Pull / Pushgit.fetch / git.pull / git.push
–Add Remote…git.addRemote
–Refresh Git Statusgit.refresh
–Set Folder as Source Control Contextgit.setContext
–Merge Branch…git.mergeBranch
–Rebase onto Branch…git.rebaseBranch
–Force Push (Replace Remote Branch)…git.forcePush
–Stash Changes…git.stash
–Apply Latest Stashgit.stashApply
–Pop Latest Stashgit.stashPop
–Drop Latest Stash…git.stashDrop
–Show Stashesgit.showStashes
–Compare with Branch…git.compareWithBranch
–Rename Branch…git.renameBranch
–Delete Branch…git.deleteBranch
–Set Upstream…git.setUpstream
–Push Branch…git.pushBranch
–Delete Remote Branch…git.deleteRemoteBranch
–Delete Tag…git.deleteTag
–Push Tag…git.pushTag
–Undo Last Commit…git.undoLastCommit
–Edit History…git.editHistory

Large-file tabs

KeysAction
Enter, F2, double-clickEdit the selected line
Ctrl+EnterInsert a line below
DeleteDelete the selected lines
Ctrl+CCopy the selected lines
Ctrl+F, then EnterFind
F3 / Shift+F3Next / previous hit
Ctrl+GGo to line
Ctrl+Z / Ctrl+YUndo / redo
–Filter Lines
–Follow (Show Lines as They Are Added)
–Show Info

Changing shortcuts

Tools › Keyboard Shortcuts… (also Help › Change Keyboard Shortcuts…, the palette, and Edit shortcuts… in Settings › Keyboard shortcuts) opens the Keyboard Shortcuts tab. It lists every command under its menu category with its keys. There is only ever one such tab, and it isn't reopened when Quarry restarts.

  • Search finds a command by its name ("duplicate"), its menu ("git") or its keys ("ctrl+shift+d"); the matching text is highlighted. Escape empties the box.
  • By category / By name / By keys changes the order. By keys lists commands without a shortcut last.
  • Changed only lists just the shortcuts you changed.
  • The line at the bottom counts the commands and your changes.

Typing a command's name or keys in the Settings filter also works: the Keyboard shortcuts row then says how many commands match, and Show matches opens the tab with that search.

Each command has three buttons (double-clicking the row is the same as Change):

  • Change (pencil). Press the new keys, then Enter or Assign. For a two-key shortcut such as Ctrl+K J, press the second combination before Enter. Backspace starts over and Escape cancels. Nothing else reacts to the keyboard while Quarry is waiting for the keys.
  • Remove (×). The command keeps working from the menus and the palette, without a shortcut.
  • Restore default (↺). Back to the built-in keys.

Restore all puts every shortcut back, after asking.

Rules Quarry applies:

  • A shortcut needs Ctrl or Alt, or is a function key (F5, Shift+F6). The second key of a two-key shortcut can be anything.
  • If another command has the keys, Quarry names it; assigning takes the keys away from that command. Restoring a command's default takes its keys back in the same way.
  • A single shortcut can't be the first half of a two-key shortcut (Ctrl+K on its own while Ctrl+K M exists), and a two-key shortcut can't start with a key that is a shortcut itself.
  • Ctrl+C, Ctrl+X and Ctrl+V stay with the clipboard, F10 with the menu bar, and Alt+letter with the menu that letter opens (Alt+F for File, and so on).

Menus and the palette show your keys at once. A built-in key you moved or removed does nothing in the editor afterwards. Tooltips and this page keep naming the built-in keys.

The keys under Editor keys from CodeMirror and the keys of the find bar, lists and dialogs are not commands and can't be changed; a shortcut you assign to one of those editor keys wins over it.

Your shortcuts are stored in settings.json as keybindings (command id → keys; an empty text means no shortcut). Reset all to defaults in Settings restores them too.

Editor keys from CodeMirror

KeysAction
Ctrl+EnterInsert a blank line below
Alt+LSelect line
Ctrl+ISelect the enclosing syntax node
Ctrl+[ / Ctrl+]Outdent / indent
Ctrl+Alt+\Re-indent the selection
Shift+Alt+↑ / Shift+Alt+↓Copy line up / down
Alt+← / Alt+→Move by syntax node
Ctrl+U / Alt+UUndo / redo the last selection change
Ctrl+Alt+[ / Ctrl+Alt+]Fold all / unfold all
Ctrl+SpaceShow completions
Ctrl+Backspace / Ctrl+DeleteDelete word
Esc, then TabMove focus out of the editor