Skip to main content
This page provides a comprehensive reference for all available commands (actions) in Glass. Commands can be executed via keybindings, the command palette (Cmd+Shift+P or Ctrl+Shift+P), or programmatically.
Commands in Glass are also called “actions” in the codebase. They follow the format namespace::CommandName.

Editor Commands

Text Manipulation

editor::Newline
action
Insert a new line at the cursor position. Respects auto-indentation settings.
editor::NewlineAbove
action
Insert a new line above the current line and move cursor to it.
editor::NewlineBelow
action
Insert a new line below the current line and move cursor to it.
editor::Backspace
action
Delete the character before the cursor. Respects auto-closing bracket behavior.
editor::Delete
action
Delete the character after the cursor.
editor::DeleteLine
action
Delete the entire current line.
editor::DeleteToBeginningOfLine
action
Delete all text from cursor to the beginning of the line.
editor::DeleteToEndOfLine
action
Delete all text from cursor to the end of the line.
editor::DeleteToPreviousWordStart
action
Delete text from cursor to the start of the previous word.Parameters:
  • ignore_newlines: boolean - Skip over newlines when deleting
  • ignore_brackets: boolean - Skip over brackets when deleting
editor::DeleteToNextWordEnd
action
Delete text from cursor to the end of the next word.Parameters:
  • ignore_newlines: boolean - Skip over newlines when deleting
  • ignore_brackets: boolean - Skip over brackets when deleting
editor::Cut
action
Cut selected text to clipboard. If no selection, cuts the entire line.
editor::Copy
action
Copy selected text to clipboard. If no selection, copies the entire line.
editor::Paste
action
Paste text from clipboard at cursor position(s).
editor::Undo
action
Undo the last edit operation.
editor::Redo
action
Redo the last undone operation.
editor::UndoSelection
action
Undo the last selection change.
editor::RedoSelection
action
Redo the last undone selection change.

Line Operations

editor::MoveLineUp
action
Move the current line or selected lines upward.
editor::MoveLineDown
action
Move the current line or selected lines downward.
editor::DuplicateLineUp
action
Duplicate the current line or selection above.
editor::DuplicateLineDown
action
Duplicate the current line or selection below.
editor::JoinLines
action
Join the current line with the next line.
editor::Transpose
action
Transpose (swap) characters around the cursor.

Indentation

editor::Indent
action
Indent the current line or selected lines.
editor::Outdent
action
Outdent (unindent) the current line or selected lines.
editor::Tab
action
Insert a tab or spaces (based on settings) or accept completion/snippet.
editor::Backtab
action
Remove indentation at cursor position.

Comments

editor::ToggleComments
action
Toggle line or block comments for selected lines.Parameters:
  • advance_downwards: boolean - Move cursor down after toggling
editor::MoveUp
action
Move cursor up one line.
editor::MoveDown
action
Move cursor down one line.
editor::MoveLeft
action
Move cursor left one character.
editor::MoveRight
action
Move cursor right one character.
editor::MoveToBeginningOfLine
action
Move cursor to the beginning of the line.Parameters:
  • stop_at_soft_wraps: boolean - Stop at soft wrap points
  • stop_at_indent: boolean - Stop at first non-whitespace character
editor::MoveToEndOfLine
action
Move cursor to the end of the line.Parameters:
  • stop_at_soft_wraps: boolean - Stop at soft wrap points
editor::MoveToBeginning
action
Move cursor to the beginning of the file.
editor::MoveToEnd
action
Move cursor to the end of the file.
editor::MoveToPreviousWordStart
action
Move cursor to the start of the previous word.
editor::MoveToNextWordEnd
action
Move cursor to the end of the next word.
editor::MoveToPreviousSubwordStart
action
Move cursor to the start of the previous subword (camelCase/snake_case boundary).
editor::MoveToNextSubwordEnd
action
Move cursor to the end of the next subword.
editor::MoveToStartOfParagraph
action
Move cursor to the start of the current paragraph.
editor::MoveToEndOfParagraph
action
Move cursor to the end of the current paragraph.
editor::MovePageUp
action
Move cursor up one page.Parameters:
  • center_cursor: boolean - Center the cursor after moving
editor::MovePageDown
action
Move cursor down one page.Parameters:
  • center_cursor: boolean - Center the cursor after moving

Selection

editor::SelectAll
action
Select all text in the current buffer.
editor::SelectLine
action
Select the entire current line.
editor::SelectUp
action
Extend selection up one line.
editor::SelectDown
action
Extend selection down one line.
editor::SelectLeft
action
Extend selection left one character.
editor::SelectRight
action
Extend selection right one character.
editor::SelectToBeginningOfLine
action
Extend selection to the beginning of the line.Parameters:
  • stop_at_soft_wraps: boolean
  • stop_at_indent: boolean
editor::SelectToEndOfLine
action
Extend selection to the end of the line.Parameters:
  • stop_at_soft_wraps: boolean
editor::SelectToBeginning
action
Extend selection to the beginning of the file.
editor::SelectToEnd
action
Extend selection to the end of the file.
editor::SelectToPreviousWordStart
action
Extend selection to the start of the previous word.
editor::SelectToNextWordEnd
action
Extend selection to the end of the next word.
editor::SelectNext
action
Select the next occurrence of the current selection.Parameters:
  • replace_newest: boolean - Replace current selection instead of adding
editor::SelectPrevious
action
Select the previous occurrence of the current selection.Parameters:
  • replace_newest: boolean - Replace current selection instead of adding
editor::SelectAllMatches
action
Select all occurrences of the current selection.
editor::SelectLargerSyntaxNode
action
Expand selection to the next larger syntax node.
editor::SelectSmallerSyntaxNode
action
Shrink selection to the next smaller syntax node.
editor::SelectEnclosingSymbol
action
Select the enclosing symbol at cursor position.

Multiple Cursors

editor::AddSelectionAbove
action
Add a cursor on the line above.Parameters:
  • skip_soft_wrap: boolean - Skip soft-wrapped lines
editor::AddSelectionBelow
action
Add a cursor on the line below.Parameters:
  • skip_soft_wrap: boolean - Skip soft-wrapped lines

Code Intelligence

editor::GoToDefinition
action
Navigate to the definition of the symbol at cursor.
editor::GoToDefinitionSplit
action
Open the definition in a split pane.
editor::GoToTypeDefinition
action
Navigate to the type definition of the symbol at cursor.
editor::GoToTypeDefinitionSplit
action
Open the type definition in a split pane.
editor::GoToImplementation
action
Navigate to the implementation of the symbol at cursor.
editor::FindAllReferences
action
Find all references to the symbol at cursor.
editor::GoToDeclaration
action
Navigate to the declaration of the symbol at cursor.
editor::Rename
action
Rename the symbol at cursor across the project.
editor::ConfirmRename
action
Confirm a rename operation.
editor::Format
action
Format the current file or selection.
editor::OrganizeImports
action
Organize/sort imports in the current file.
editor::ToggleCodeActions
action
Show or hide the code actions menu.
editor::ConfirmCodeAction
action
Confirm and apply the selected code action.
editor::ShowCompletions
action
Show code completion suggestions.
editor::ShowWordCompletions
action
Show word-based completions.
editor::ConfirmCompletion
action
Accept the selected completion.
editor::ConfirmCompletionReplace
action
Accept completion and replace the word after cursor.
editor::ShowSignatureHelp
action
Show parameter hints for the current function call.
editor::Hover
action
Show hover information for the symbol at cursor.
editor::BlameHover
action
Show git blame information in a hover.

Diagnostics

editor::GoToDiagnostic
action
Navigate to the next diagnostic (error/warning).Parameters:
  • severity: object - Minimum and maximum severity to include
editor::GoToPreviousDiagnostic
action
Navigate to the previous diagnostic.Parameters:
  • severity: object - Minimum and maximum severity to include

Folding

editor::Fold
action
Fold the code block at cursor.
editor::FoldRecursive
action
Fold the code block and all nested blocks.
editor::UnfoldLines
action
Unfold the code block at cursor.
editor::UnfoldRecursive
action
Unfold the code block and all nested blocks.
editor::ToggleFold
action
Toggle folding at cursor position.
editor::FoldAll
action
Fold all foldable code blocks.
editor::UnfoldAll
action
Unfold all folded code blocks.
editor::FoldAtLevel_1
action
Fold all blocks at indentation level 1.
editor::FoldAtLevel_2
action
Fold all blocks at indentation level 2.

Display

editor::ToggleLineNumbers
action
Show or hide line numbers in the gutter.
editor::ToggleSoftWrap
action
Toggle soft wrapping of long lines.
editor::ToggleInlayHints
action
Show or hide inlay hints.
editor::ScrollCursorCenter
action
Scroll the editor to center the cursor.

Git

editor::ToggleSelectedDiffHunks
action
Toggle display of git diff hunks in selected regions.
editor::ExpandAllDiffHunks
action
Expand all collapsed git diff hunks.
editor::GoToHunk
action
Navigate to the next git diff hunk.
editor::GoToPreviousHunk
action
Navigate to the previous git diff hunk.
editor::GoToPreviousChange
action
Navigate to the previous change in file history.
editor::GoToNextChange
action
Navigate to the next change in file history.

Debugging

editor::ToggleBreakpoint
action
Toggle a breakpoint at the current line.
editor::EditLogBreakpoint
action
Edit a log breakpoint at the current line.

Miscellaneous

editor::Cancel
action
Cancel the current operation (close popover, clear selection, etc.).
editor::OpenExcerpts
action
Open excerpts (search results/references) in current pane.
editor::OpenExcerptsSplit
action
Open excerpts in a split pane.
editor::Rewrap
action
Rewrap text to the preferred line length.

Workspace Commands

File Operations

workspace::Open
action
Open a file or folder picker.
workspace::NewFile
action
Create a new untitled file.
workspace::NewWindow
action
Open a new Glass window.
workspace::Save
action
Save the current file.
workspace::SaveAs
action
Save the current file with a new name.
workspace::SaveAll
action
Save all open files.
workspace::SaveWithoutFormat
action
Save the current file without formatting.
workspace::CloseWindow
action
Close the current window.

Pane Management

workspace::ActivatePane
action
Activate a pane by index.Parameters:
  • Index (0-8): number - Pane number to activate
workspace::ActivatePaneLeft
action
Activate the pane to the left.
workspace::ActivatePaneRight
action
Activate the pane to the right.
workspace::ActivatePaneUp
action
Activate the pane above.
workspace::ActivatePaneDown
action
Activate the pane below.
workspace::SwapPaneLeft
action
Swap current pane with the one to the left.
workspace::SwapPaneRight
action
Swap current pane with the one to the right.
workspace::SwapPaneUp
action
Swap current pane with the one above.
workspace::SwapPaneDown
action
Swap current pane with the one below.

Dock Management

workspace::ToggleLeftDock
action
Show or hide the left dock (project panel).
workspace::ToggleRightDock
action
Show or hide the right dock (agent panel).
workspace::ToggleBottomDock
action
Show or hide the bottom dock (terminal, diagnostics).
workspace::ToggleAllDocks
action
Toggle visibility of all docks.
workspace::CloseActiveDock
action
Close the currently active dock.

Terminal

workspace::NewTerminal
action
Create a new terminal in the current directory.
terminal_panel::Toggle
action
Show or hide the terminal panel.

Zoom

workspace::ToggleZoom
action
Toggle zoom mode for the current pane (maximize/restore).

Sessions

workspace::Unfollow
action
Stop following another user in a collaborative session.

Pane Commands

pane::ActivateItem
action
Activate an item (tab) by index.Parameters:
  • Index (0-8): number - Tab number to activate
pane::ActivateLastItem
action
Activate the last tab in the pane.
pane::ActivateNextItem
action
Activate the next tab.
pane::ActivatePreviousItem
action
Activate the previous tab.
pane::CloseActiveItem
action
Close the currently active tab.Parameters:
  • close_pinned: boolean - Whether to close pinned tabs
pane::CloseAllItems
action
Close all tabs in the pane.Parameters:
  • close_pinned: boolean - Whether to close pinned tabs
pane::CloseOtherItems
action
Close all tabs except the active one.Parameters:
  • close_pinned: boolean - Whether to close pinned tabs
pane::CloseCleanItems
action
Close all unmodified tabs.Parameters:
  • close_pinned: boolean - Whether to close pinned tabs
pane::ReopenClosedItem
action
Reopen the last closed tab.
pane::SplitUp
action
Split the pane upward.
pane::SplitDown
action
Split the pane downward.
pane::SplitLeft
action
Split the pane to the left.
pane::SplitRight
action
Split the pane to the right.
pane::GoBack
action
Navigate to the previous location in navigation history.
pane::GoForward
action
Navigate to the next location in navigation history.
pane::TogglePinTab
action
Pin or unpin the current tab.
Open project search.Parameters:
  • replace_enabled: boolean - Open with replace mode enabled
pane::RevealInProjectPanel
action
Reveal the current file in the project panel.

Search Commands

buffer_search::Deploy
action
Open buffer search (find in current file).Parameters:
  • focus: boolean - Whether to focus the search input
  • selection_search_enabled: boolean - Search for current selection
buffer_search::DeployReplace
action
Open buffer search with replace mode.
buffer_search::Dismiss
action
Close the buffer search bar.
buffer_search::FocusEditor
action
Return focus to the editor from the search bar.
search::SelectNextMatch
action
Select the next search result.
search::SelectPreviousMatch
action
Select the previous search result.
search::SelectAllMatches
action
Select all search results.
search::ReplaceNext
action
Replace the current match and move to next.
search::ReplaceAll
action
Replace all matches in the file.
project_search::ToggleFocus
action
Focus or unfocus the project search panel.
project_search::SearchInNew
action
Open search results in a new pane.
project_search::ToggleFilters
action
Show or hide search filters.
project_search::ToggleAllSearchResults
action
Expand or collapse all search results.
search::ToggleCaseSensitive
action
Toggle case-sensitive search.
search::ToggleWholeWord
action
Toggle whole-word search.
search::ToggleRegex
action
Toggle regular expression search.
search::ToggleReplace
action
Toggle replace mode in search.
search::ToggleSelection
action
Toggle search in selection only.

Project Panel Commands

project_panel::ToggleFocus
action
Focus or unfocus the project panel.
project_panel::NewFile
action
Create a new file in the selected directory.
project_panel::NewDirectory
action
Create a new directory in the selected directory.
project_panel::Rename
action
Rename the selected file or directory.
project_panel::Duplicate
action
Duplicate the selected file or directory.
project_panel::Trash
action
Move the selected file or directory to trash.Parameters:
  • skip_prompt: boolean - Skip confirmation prompt
project_panel::Delete
action
Permanently delete the selected file or directory.Parameters:
  • skip_prompt: boolean - Skip confirmation prompt
project_panel::Cut
action
Cut the selected file or directory.
project_panel::Copy
action
Copy the selected file or directory.
project_panel::Paste
action
Paste the cut or copied file or directory.
project_panel::CopyPath
action
Copy the full path of the selected item.
project_panel::CopyRelativePath
action
Copy the relative path of the selected item.
project_panel::RevealInFileManager
action
Reveal the selected item in the system file manager.
project_panel::ExpandSelectedEntry
action
Expand the selected directory.
project_panel::CollapseSelectedEntry
action
Collapse the selected directory.
project_panel::CollapseAllEntries
action
Collapse all directories in the tree.

Git Commands

git::Blame
action
Show git blame for the current file.
git::OpenModifiedFiles
action
Open all modified files in the workspace.
git::ReviewDiff
action
Review git diff for staged/unstaged changes.
git::Diff
action
Show diff for the current file.
git::Restore
action
Restore the current file to HEAD state.
git::ToggleStaged
action
Toggle staging for the current hunk.
git::StageAndNext
action
Stage the current hunk and move to the next.
git::UnstageAndNext
action
Unstage the current hunk and move to the next.
git::StageAll
action
Stage all changes in the workspace.
git::UnstageAll
action
Unstage all staged changes.
git::Commit
action
Commit staged changes.
git::Amend
action
Amend the last commit with staged changes.
git::Fetch
action
Fetch from remote repository.
git::Pull
action
Pull from remote repository.
git::PullRebase
action
Pull with rebase from remote repository.
git::Push
action
Push to remote repository.
git::ForcePush
action
Force push to remote repository.
git_panel::ToggleFocus
action
Focus or unfocus the git panel.

Agent (AI Assistant) Commands

agent::ToggleFocus
action
Focus or unfocus the agent panel.
agent::NewThread
action
Create a new agent thread.
agent::NewTextThread
action
Create a new text-only agent thread.
agent::AddSelectionToThread
action
Add the current selection to the agent thread.
assistant::InlineAssist
action
Trigger inline AI assistance at cursor.
assistant::InsertIntoEditor
action
Insert the agent’s response into the editor.
agent::Keep
action
Accept an agent suggestion (in diff view).
agent::Reject
action
Reject an agent suggestion (in diff view).
agent::KeepAll
action
Accept all agent suggestions.
agent::RejectAll
action
Reject all agent suggestions.
agent::OpenSettings
action
Open agent settings.
agent::OpenHistory
action
Open agent thread history.
agent::ToggleModelSelector
action
Show or hide the model selector.

Diagnostics Commands

diagnostics::Deploy
action
Open the diagnostics panel.
diagnostics::ToggleDiagnosticsRefresh
action
Toggle automatic diagnostics refresh.

Debugger Commands

debugger::Start
action
Start a debug session.
debugger::Stop
action
Stop the current debug session.
debugger::Continue
action
Continue execution (resume from breakpoint).
debugger::Pause
action
Pause execution.
debugger::StepOver
action
Step over the current line.
debugger::StepInto
action
Step into the function call.
debugger::StepOut
action
Step out of the current function.
debugger::Rerun
action
Restart the debug session.
debug_panel::ToggleFocus
action
Focus or unfocus the debug panel.

Task Commands

task::Spawn
action
Run a task from the task menu.Parameters:
  • task_name: string - Specific task to run
  • task_tag: string - Run tasks with this tag
  • reveal_target: string - Where to show output (“dock”, “center”)
task::Rerun
action
Rerun the last task.Parameters:
  • reevaluate_context: boolean - Re-evaluate task context/variables

Terminal Commands

terminal::Clear
action
Clear the terminal output.
terminal::Copy
action
Copy selected text from terminal.
terminal::Paste
action
Paste text into terminal.
terminal::ShowCharacterPalette
action
Show character palette (emoji picker).

Application Commands

zed::OpenSettings
action
Open the settings UI.
zed::OpenSettingsFile
action
Open the settings JSON file in editor.
zed::OpenKeymap
action
Open the keymap file in editor.
zed::Quit
action
Quit the application.
zed::Hide
action
Hide the application (macOS only).
zed::HideOthers
action
Hide other applications (macOS only).
zed::Minimize
action
Minimize the current window.
zed::ToggleFullScreen
action
Toggle full screen mode.
zed::IncreaseBufferFontSize
action
Increase editor font size.Parameters:
  • persist: boolean - Save the change to settings
zed::DecreaseBufferFontSize
action
Decrease editor font size.Parameters:
  • persist: boolean - Save the change to settings
zed::ResetBufferFontSize
action
Reset editor font size to default.Parameters:
  • persist: boolean - Save the change to settings
zed::Extensions
action
Open the extensions panel.

File Finder Commands

file_finder::Toggle
action
Open or close the file finder.
file_finder::ToggleSplitMenu
action
Show menu to choose split direction for opening files.
file_finder::ToggleFilterMenu
action
Show file type filter menu.

Command Palette

command_palette::Toggle
action
Open or close the command palette.

Theme Commands

theme_selector::Toggle
action
Open the theme selector.

Language Commands

language_selector::Toggle
action
Open the language selector for current file.
encoding_selector::Toggle
action
Open the encoding selector for current file.
menu::SelectNext
action
Select the next item in a menu or list.
menu::SelectPrevious
action
Select the previous item in a menu or list.
menu::SelectFirst
action
Select the first item in a menu or list.
menu::SelectLast
action
Select the last item in a menu or list.
menu::Confirm
action
Confirm the selected menu item.
menu::Cancel
action
Cancel and close the menu.

Custom Commands

You can define custom commands by mapping them to existing actions in your keymap file:
[
  {
    "context": "Editor",
    "bindings": {
      "ctrl+shift+d": "editor::DuplicateLine"
    }
  }
]
Or create command aliases in settings:
{
  "command_aliases": {
    "W": "workspace::Save",
    "Q": "zed::Quit"
  }
}
This reference includes the most commonly used commands. For a complete list of all available commands, open the command palette (Cmd+Shift+P or Ctrl+Shift+P) and browse the available actions.

Build docs developers (and LLMs) love