This page provides a comprehensive reference for all default keybindings in Glass. You can customize keybindings in your keymap file (Ctrl+K Ctrl+S or Cmd+K Cmd+S).
Glass uses different keybindings for macOS, Linux, and Windows. This reference shows both macOS (Cmd) and Linux/Windows (Ctrl) variants where they differ.
Base Keymaps
Glass supports multiple base keymap configurations:
VSCode (default): Keybindings matching Visual Studio Code
Atom : Keybindings matching Atom editor
JetBrains : Keybindings matching JetBrains IDEs
Sublime Text : Keybindings matching Sublime Text
TextMate : Keybindings matching TextMate
Emacs : Keybindings matching Emacs
Change the base keymap in settings:
{
"base_keymap" : "VSCode"
}
Global Actions
Application
Key Action Description Cmd+,Open Settings Open settings UI Cmd+Alt+,Open Settings File Open settings JSON Cmd+QQuit Quit application Cmd+HHide Hide application Alt+Cmd+HHide Others Hide other applications Cmd+MMinimize Minimize window Fn+F or Ctrl+Cmd+FToggle Full Screen Toggle full screen mode Cmd+Shift+WClose Window Close current window
Key Action Description Ctrl+,Open Settings Open settings UI Ctrl+Alt+,Open Settings File Open settings JSON Ctrl+QQuit Quit application F11Toggle Full Screen Toggle full screen mode Ctrl+Shift+WClose Window Close current window
Font Size
Key Action Description Cmd+= or Cmd++Increase Buffer Font Increase editor font size Cmd+-Decrease Buffer Font Decrease editor font size Cmd+0Reset Buffer Font Reset editor font to default
Key Action Description Ctrl+= or Ctrl++Increase Buffer Font Increase editor font size Ctrl+-Decrease Buffer Font Decrease editor font size Ctrl+0Reset Buffer Font Reset editor font to default
File Operations
Key Action Description Cmd+NNew File Create new file Cmd+OOpen Open file or folder Cmd+SSave Save current file Cmd+Shift+SSave As Save file with new name Cmd+Alt+SSave All Save all open files Cmd+K SSave Without Format Save without formatting Cmd+WClose Active Item Close current tab Cmd+Shift+TReopen Closed Item Reopen last closed tab
Key Action Description Ctrl+NNew File Create new file Ctrl+OOpen Files Open files Ctrl+K Ctrl+OOpen Folder Open folder Ctrl+SSave Save current file Ctrl+Shift+SSave As Save file with new name Ctrl+Alt+SSave All Save all open files Ctrl+K SSave Without Format Save without formatting Ctrl+W or Ctrl+F4Close Active Item Close current tab Ctrl+Shift+TReopen Closed Item Reopen last closed tab
Navigation
File Finder
Key Action Description Cmd+PFile Finder Quick file search Cmd+Shift+OGo to Symbol Go to symbol in workspace Cmd+TGo to Type Go to type definition
Key Action Description Ctrl+PFile Finder Quick file search Ctrl+Shift+ORecent Projects Open recent projects
Panes and Tabs
Key Action Description Cmd+1-9Activate Pane Switch to pane 1-9 Ctrl+1-9Activate Tab Switch to tab 1-9 in pane Ctrl+0Activate Last Tab Switch to last tab Cmd+{ or Alt+Cmd+LeftPrevious Tab Go to previous tab Cmd+} or Alt+Cmd+RightNext Tab Go to next tab Ctrl+TabTab Switcher Open tab switcher Ctrl+Shift+TabTab Switcher (Reverse) Open tab switcher (last first)
Key Action Description Alt+1-9Activate Pane Switch to pane 1-9 Alt+1-9Activate Tab Switch to tab 1-9 (in pane context) Alt+0Activate Last Tab Switch to last tab Ctrl+PageUpPrevious Tab Go to previous tab Ctrl+PageDownNext Tab Go to next tab Ctrl+TabTab Switcher Open tab switcher Ctrl+Shift+TabTab Switcher (Reverse) Open tab switcher (last first)
Pane Splitting
Key Action Description Cmd+\\Split Right Split pane to the right Cmd+K UpSplit Up Split pane upward Cmd+K DownSplit Down Split pane downward Cmd+K LeftSplit Left Split pane to the left Cmd+K RightSplit Right Split pane to the right
Key Action Description Ctrl+\\Split Right Split pane to the right Ctrl+K UpSplit Up Split pane upward Ctrl+K DownSplit Down Split pane downward Ctrl+K LeftSplit Left Split pane to the left Ctrl+K RightSplit Right Split pane to the right
Editor
Text Editing
Key Action Description Cmd+XCut Cut selection Cmd+CCopy Copy selection Cmd+VPaste Paste from clipboard Cmd+ZUndo Undo last change Cmd+Shift+ZRedo Redo last undone change Cmd+/Toggle Comments Toggle line/block comments Cmd+]Indent Indent selected lines Cmd+[Outdent Outdent selected lines Cmd+EnterNewline Below Insert line below Cmd+Shift+EnterNewline Above Insert line above
Key Action Description Ctrl+X or Shift+DeleteCut Cut selection Ctrl+C or Ctrl+InsertCopy Copy selection Ctrl+V or Shift+InsertPaste Paste from clipboard Ctrl+ZUndo Undo last change Ctrl+Y or Ctrl+Shift+ZRedo Redo last undone change Ctrl+/Toggle Comments Toggle line/block comments Ctrl+]Indent Indent selected lines Ctrl+[Outdent Outdent selected lines Ctrl+EnterNewline Below Insert line below Ctrl+Shift+EnterNewline Above Insert line above
Cursor Movement
Key Action Description Cmd+Left or Ctrl+ALine Start Move to beginning of line Cmd+Right or Ctrl+ELine End Move to end of line Cmd+UpFile Start Move to beginning of file Cmd+DownFile End Move to end of file Alt+LeftPrevious Word Move to previous word Alt+RightNext Word Move to next word Ctrl+LCenter Cursor Scroll to center cursor
Key Action Description HomeLine Start Move to beginning of line EndLine End Move to end of line Ctrl+HomeFile Start Move to beginning of file Ctrl+EndFile End Move to end of file Ctrl+LeftPrevious Word Move to previous word Ctrl+RightNext Word Move to next word
Selection
Key Action Description Cmd+ASelect All Select entire file Cmd+LSelect Line Select current line Cmd+DSelect Next Select next occurrence Cmd+K Cmd+DSelect Next (Skip) Move selection to next occurrence Cmd+Shift+LSelect All Matches Select all occurrences Cmd+Ctrl+LeftSelect Smaller Syntax Node Shrink selection Cmd+Ctrl+RightSelect Larger Syntax Node Expand selection
Key Action Description Ctrl+ASelect All Select entire file Ctrl+LSelect Line Select current line Ctrl+DSelect Next Select next occurrence Ctrl+K Ctrl+DSelect Next (Skip) Move selection to next occurrence Ctrl+Shift+LSelect All Matches Select all occurrences Alt+Shift+LeftSelect Smaller Syntax Node Shrink selection Alt+Shift+RightSelect Larger Syntax Node Expand selection
Multiple Cursors
Key Action Description Cmd+Ctrl+P or Cmd+Alt+UpAdd Cursor Above Add cursor on line above Cmd+Ctrl+N or Cmd+Alt+DownAdd Cursor Below Add cursor on line below Cmd+ClickAdd Cursor at Click Add cursor at mouse position
Key Action Description Shift+Alt+UpAdd Cursor Above Add cursor on line above Shift+Alt+DownAdd Cursor Below Add cursor on line below Alt+ClickAdd Cursor at Click Add cursor at mouse position
Line Manipulation
Key Action Description Cmd+Shift+KDelete Line Delete current line Alt+UpMove Line Up Move line up Alt+DownMove Line Down Move line down Alt+Shift+UpDuplicate Line Up Duplicate line upward Alt+Shift+DownDuplicate Line Down Duplicate line downward
Key Action Description Ctrl+Shift+KDelete Line Delete current line Alt+UpMove Line Up Move line up Alt+DownMove Line Down Move line down Ctrl+Alt+Shift+UpDuplicate Line Up Duplicate line upward Ctrl+Alt+Shift+DownDuplicate Line Down Duplicate line downward
Code Navigation
Key Action Description F12Go to Definition Go to symbol definition Alt+F12Go to Definition (Split) Open definition in split Cmd+F12Go to Type Definition Go to type definition Shift+F12Go to Implementation Go to implementation Alt+Shift+F12Find All References Find all references F2Rename Rename symbol Cmd+K Cmd+IHover Show hover information Cmd+K Cmd+BBlame Hover Show git blame
Key Action Description F12Go to Definition Go to symbol definition Alt+F12Go to Definition (Split) Open definition in split Ctrl+F12Go to Type Definition Go to type definition Shift+F12Go to Implementation Go to implementation Alt+Shift+F12Find All References Find all references F2Rename Rename symbol Ctrl+K Ctrl+IHover Show hover information Ctrl+K Ctrl+BBlame Hover Show git blame
Code Actions
Key Action Description Cmd+.Toggle Code Actions Show code actions menu Cmd+Shift+IFormat Document Format file Alt+Shift+OOrganize Imports Organize imports Ctrl+SpaceShow Completions Show completion suggestions
Key Action Description Ctrl+.Toggle Code Actions Show code actions menu Ctrl+Shift+IFormat Document Format file Alt+Shift+OOrganize Imports Organize imports Ctrl+SpaceShow Completions Show completion suggestions
Folding
Key Action Description Cmd+Alt+[Fold Fold current section Cmd+Alt+]Unfold Unfold current section Cmd+K Cmd+LToggle Fold Toggle fold at cursor Cmd+K Cmd+0Fold All Fold all sections Cmd+K Cmd+JUnfold All Unfold all sections Cmd+K Cmd+1-9Fold at Level Fold at indentation level
Key Action Description Ctrl+{Fold Fold current section Ctrl+}Unfold Unfold current section Ctrl+K Ctrl+LToggle Fold Toggle fold at cursor Ctrl+K Ctrl+0Fold All Fold all sections Ctrl+K Ctrl+JUnfold All Unfold all sections Ctrl+K Ctrl+1-9Fold at Level Fold at indentation level
Search and Replace
Key Action Description Cmd+FBuffer Search Search in current file Cmd+Alt+FBuffer Search (Replace) Search and replace in file Cmd+GSelect Next Match Go to next search result Cmd+Shift+GSelect Previous Match Go to previous result Cmd+Shift+FProject Search Search across project Cmd+Shift+HProject Search (Replace) Search and replace in project Alt+EnterSelect All Matches Select all search matches
Key Action Description Ctrl+FBuffer Search Search in current file Ctrl+HBuffer Search (Replace) Search and replace in file F3 or Ctrl+GSelect Next Match Go to next search result Shift+F3 or Ctrl+Shift+GSelect Previous Match Go to previous result Ctrl+Shift+FProject Search Search across project Ctrl+Shift+HProject Search (Replace) Search and replace in project Alt+EnterSelect All Matches Select all search matches
Panels and Docks
Key Action Description Cmd+BToggle Left Dock Toggle project panel Cmd+R or Cmd+Alt+BToggle Right Dock Toggle agent panel Cmd+JSwitch to Terminal Mode Focus terminal Cmd+ESwitch to Editor Mode Focus editor Cmd+Shift+EToggle Project Panel Focus project panel Cmd+Shift+MToggle Diagnostics Open diagnostics panel Ctrl+Shift+GToggle Git Panel Focus git panel Cmd+?Toggle Agent Focus agent panel Cmd+Shift+PCommand Palette Open command palette
Key Action Description Ctrl+BToggle Left Dock Toggle project panel Ctrl+Alt+BToggle Right Dock Toggle agent panel Ctrl+JSwitch to Terminal Mode Focus terminal Ctrl+ESwitch to Editor Mode Focus editor Ctrl+Shift+EToggle Project Panel Focus project panel Ctrl+Shift+MToggle Diagnostics Open diagnostics panel Ctrl+Shift+GToggle Git Panel Focus git panel Ctrl+?Toggle Agent Focus agent panel F1 or Ctrl+Shift+PCommand Palette Open command palette
Terminal
Key Action Description `Ctrl+“ Toggle Terminal Show/hide terminal panel Ctrl+~New Terminal Create new terminal Cmd+KClear Terminal Clear terminal output Cmd+CCopy Copy selected text Cmd+VPaste Paste into terminal
Key Action Description `Ctrl+“ Toggle Terminal Show/hide terminal panel Ctrl+~New Terminal Create new terminal Ctrl+Shift+LClear Terminal Clear terminal output Ctrl+Shift+CCopy Copy selected text Ctrl+Shift+VPaste Paste into terminal
Git
Key Action Description Cmd+Alt+G BGit Blame Show git blame Cmd+Alt+G MOpen Modified Files Open all modified files Cmd+Alt+G RReview Diff Review git diff Cmd+YStage and Next Stage hunk and move to next Cmd+Shift+YUnstage and Next Unstage hunk and move to next Cmd+Alt+YToggle Staged Toggle staging for hunk Cmd+Alt+ZRestore Restore file to HEAD
Key Action Description Alt+G BGit Blame Show git blame Alt+G MOpen Modified Files Open all modified files Alt+G RReview Diff Review git diff Alt+YStage and Next Stage hunk and move to next Alt+Shift+YUnstage and Next Unstage hunk and move to next Ctrl+Alt+YToggle Staged Toggle staging for hunk Ctrl+K Ctrl+RRestore Restore file to HEAD
Agent (AI Assistant)
Key Action Description Ctrl+EnterInline Assist Trigger inline AI assistance Cmd+>Add Selection to Thread Add selection to agent thread Cmd+<Insert from Agent Insert agent response to editor Cmd+NNew Thread Create new agent thread Cmd+Alt+YKeep (Agent Diff) Accept agent suggestion Cmd+Alt+ZReject (Agent Diff) Reject agent suggestion
Key Action Description Ctrl+EnterInline Assist Trigger inline AI assistance Ctrl+>Add Selection to Thread Add selection to agent thread Ctrl+<Insert from Agent Insert agent response to editor Ctrl+NNew Thread Create new agent thread Ctrl+Alt+YKeep (Agent Diff) Accept agent suggestion Ctrl+Alt+ZReject (Agent Diff) Reject agent suggestion
Diagnostics
Key Action Description F8Go to Next Diagnostic Jump to next diagnostic Shift+F8Go to Previous Diagnostic Jump to previous diagnostic
Key Action Description F8Go to Next Diagnostic Jump to next diagnostic Shift+F8Go to Previous Diagnostic Jump to previous diagnostic
Debugger
Key Action Description F4Start Debugging Start debug session F5Continue/Rerun Continue or rerun debugger Shift+F5Stop Debugging Stop debug session F6Pause Pause execution F7Step Over Step over statement Ctrl+F11Step Into Step into function Shift+F11Step Out Step out of function F9Toggle Breakpoint Toggle breakpoint at line Shift+F9Edit Log Breakpoint Edit log breakpoint
Key Action Description F4Start Debugging Start debug session F5Continue/Rerun Continue or rerun debugger Shift+F5Stop Debugging Stop debug session F6Pause Pause execution F7Step Over Step over statement Ctrl+F11Step Into Step into function Shift+F11Step Out Step out of function F9Toggle Breakpoint Toggle breakpoint at line Shift+F9Edit Log Breakpoint Edit log breakpoint
Tasks
Key Action Description Cmd+Shift+RSpawn Task Run a task Cmd+Alt+RRerun Task Rerun last task
Key Action Description Alt+Shift+TSpawn Task Run a task Alt+T or Ctrl+Alt+RRerun Task Rerun last task
Customizing Keybindings
To customize keybindings, open your keymap file:
Press Cmd+K Cmd+S or use Cmd+Shift+P → “zed: open keymap”
Press Ctrl+K Ctrl+S or use F1 → “zed: open keymap”
Add custom bindings in JSON format:
[
{
"context" : "Editor" ,
"bindings" : {
"ctrl+shift+d" : "editor::DuplicateLine" ,
"alt+/" : "editor::ToggleComments"
}
}
]
Context determines where the keybinding is active. Common contexts include: Editor, Workspace, Terminal, ProjectPanel, Pane.
Context-Specific Bindings
Some keybindings only work in specific contexts:
Editor Context
Bindings that only work when an editor has focus:
Text editing operations
Cursor movement
Code navigation
Folding
Terminal Context
Bindings that only work in the terminal:
Terminal-specific copy/paste
Shell interactions
Terminal navigation
Panel Contexts
Bindings specific to panels:
ProjectPanel: File tree navigation
GitPanel: Git operations
AgentPanel: AI assistant interactions
Keybinding Modifiers
Cmd: Command key (⌘)
Ctrl: Control key
Alt or Option: Option key (⌥)
Shift: Shift key
Ctrl: Control key
Alt: Alt key
Shift: Shift key
Super: Windows/Meta key (Linux)
Tips
Keybinding Best Practices
Avoid conflicts : Check existing keybindings before adding new ones
Use contexts : Make keybindings context-specific when possible
Follow conventions : Use platform-appropriate modifiers (Cmd on macOS, Ctrl on Linux/Windows)
Document custom bindings : Add comments to your keymap file
Test thoroughly : Ensure custom bindings don’t interfere with essential commands