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
Insert a new line at the cursor position. Respects auto-indentation settings.
Insert a new line above the current line and move cursor to it.
Insert a new line below the current line and move cursor to it.
Delete the character before the cursor. Respects auto-closing bracket behavior.
Delete the character after the cursor.
Delete the entire current line.
Delete all text from cursor to the beginning of the line.
Delete all text from cursor to the end of the line.
Delete text from cursor to the start of the previous word.Parameters:
ignore_newlines: boolean - Skip over newlines when deletingignore_brackets: boolean - Skip over brackets when deleting
Delete text from cursor to the end of the next word.Parameters:
ignore_newlines: boolean - Skip over newlines when deletingignore_brackets: boolean - Skip over brackets when deleting
Cut selected text to clipboard. If no selection, cuts the entire line.
Copy selected text to clipboard. If no selection, copies the entire line.
Paste text from clipboard at cursor position(s).
Undo the last edit operation.
Redo the last undone operation.
Undo the last selection change.
Redo the last undone selection change.
Line Operations
Move the current line or selected lines upward.
Move the current line or selected lines downward.
Duplicate the current line or selection above.
Duplicate the current line or selection below.
Join the current line with the next line.
Transpose (swap) characters around the cursor.
Indentation
Indent the current line or selected lines.
Outdent (unindent) the current line or selected lines.
Insert a tab or spaces (based on settings) or accept completion/snippet.
Remove indentation at cursor position.
Comments
Toggle line or block comments for selected lines.Parameters:
advance_downwards: boolean - Move cursor down after toggling
Navigation
Move cursor up one line.
Move cursor down one line.
Move cursor left one character.
Move cursor right one character.
Move cursor to the beginning of the line.Parameters:
stop_at_soft_wraps: boolean - Stop at soft wrap pointsstop_at_indent: boolean - Stop at first non-whitespace character
Move cursor to the end of the line.Parameters:
stop_at_soft_wraps: boolean - Stop at soft wrap points
Move cursor to the beginning of the file.
Move cursor to the end of the file.
Move cursor to the start of the previous word.
Move cursor to the end of the next word.
Move cursor to the start of the previous subword (camelCase/snake_case boundary).
Move cursor to the end of the next subword.
Move cursor to the start of the current paragraph.
Move cursor to the end of the current paragraph.
Move cursor up one page.Parameters:
center_cursor: boolean - Center the cursor after moving
Move cursor down one page.Parameters:
center_cursor: boolean - Center the cursor after moving
Selection
Select all text in the current buffer.
Select the entire current line.
Extend selection up one line.
Extend selection down one line.
Extend selection left one character.
Extend selection right one character.
Extend selection to the beginning of the line.Parameters:
stop_at_soft_wraps: booleanstop_at_indent: boolean
Extend selection to the end of the line.Parameters:
stop_at_soft_wraps: boolean
Extend selection to the beginning of the file.
Extend selection to the end of the file.
Extend selection to the start of the previous word.
Extend selection to the end of the next word.
Select the next occurrence of the current selection.Parameters:
replace_newest: boolean - Replace current selection instead of adding
Select the previous occurrence of the current selection.Parameters:
replace_newest: boolean - Replace current selection instead of adding
Select all occurrences of the current selection.
Expand selection to the next larger syntax node.
Shrink selection to the next smaller syntax node.
Select the enclosing symbol at cursor position.
Multiple Cursors
Add a cursor on the line above.Parameters:
skip_soft_wrap: boolean - Skip soft-wrapped lines
Add a cursor on the line below.Parameters:
skip_soft_wrap: boolean - Skip soft-wrapped lines
Code Intelligence
Navigate to the definition of the symbol at cursor.
Open the definition in a split pane.
Navigate to the type definition of the symbol at cursor.
Open the type definition in a split pane.
Navigate to the implementation of the symbol at cursor.
Find all references to the symbol at cursor.
Navigate to the declaration of the symbol at cursor.
Rename the symbol at cursor across the project.
Confirm a rename operation.
Format the current file or selection.
Organize/sort imports in the current file.
Show or hide the code actions menu.
Confirm and apply the selected code action.
Show code completion suggestions.
Show word-based completions.
Accept the selected completion.
Accept completion and replace the word after cursor.
Show parameter hints for the current function call.
Show hover information for the symbol at cursor.
Show git blame information in a hover.
Diagnostics
Navigate to the next diagnostic (error/warning).Parameters:
severity: object - Minimum and maximum severity to include
Navigate to the previous diagnostic.Parameters:
severity: object - Minimum and maximum severity to include
Folding
Fold the code block at cursor.
Fold the code block and all nested blocks.
Unfold the code block at cursor.
Unfold the code block and all nested blocks.
Toggle folding at cursor position.
Fold all foldable code blocks.
Unfold all folded code blocks.
Fold all blocks at indentation level 1.
Fold all blocks at indentation level 2.
Display
Show or hide line numbers in the gutter.
Toggle soft wrapping of long lines.
Show or hide inlay hints.
Scroll the editor to center the cursor.
Git
Toggle display of git diff hunks in selected regions.
Expand all collapsed git diff hunks.
Navigate to the next git diff hunk.
Navigate to the previous git diff hunk.
Navigate to the previous change in file history.
Navigate to the next change in file history.
Debugging
Toggle a breakpoint at the current line.
Edit a log breakpoint at the current line.
Miscellaneous
Cancel the current operation (close popover, clear selection, etc.).
Open excerpts (search results/references) in current pane.
Open excerpts in a split pane.
Rewrap text to the preferred line length.
Workspace Commands
File Operations
Open a file or folder picker.
Create a new untitled file.
Open a new Glass window.
Save the current file.
Save the current file with a new name.
Save all open files.
Save the current file without formatting.
Close the current window.
Pane Management
Activate a pane by index.Parameters:
- Index (0-8): number - Pane number to activate
Activate the pane to the left.
Activate the pane to the right.
Activate the pane above.
Activate the pane below.
Swap current pane with the one to the left.
Swap current pane with the one to the right.
Swap current pane with the one above.
Swap current pane with the one below.
Dock Management
Show or hide the left dock (project panel).
Show or hide the right dock (agent panel).
Show or hide the bottom dock (terminal, diagnostics).
Toggle visibility of all docks.
Close the currently active dock.
Terminal
Create a new terminal in the current directory.
Show or hide the terminal panel.
Zoom
Toggle zoom mode for the current pane (maximize/restore).
Sessions
Stop following another user in a collaborative session.
Pane Commands
Activate an item (tab) by index.Parameters:
- Index (0-8): number - Tab number to activate
Activate the last tab in the pane.
Activate the next tab.
Activate the previous tab.
Close the currently active tab.Parameters:
close_pinned: boolean - Whether to close pinned tabs
Close all tabs in the pane.Parameters:
close_pinned: boolean - Whether to close pinned tabs
Close all tabs except the active one.Parameters:
close_pinned: boolean - Whether to close pinned tabs
Close all unmodified tabs.Parameters:
close_pinned: boolean - Whether to close pinned tabs
Reopen the last closed tab.
Split the pane upward.
Split the pane downward.
Split the pane to the left.
Split the pane to the right.
Navigate to the previous location in navigation history.
Navigate to the next location in navigation history.
Pin or unpin the current tab.
Open project search.Parameters:
replace_enabled: boolean - Open with replace mode enabled
Reveal the current file in the project panel.
Search Commands
Buffer Search
Open buffer search (find in current file).Parameters:
focus: boolean - Whether to focus the search inputselection_search_enabled: boolean - Search for current selection
Open buffer search with replace mode.
Close the buffer search bar.
Return focus to the editor from the search bar.
Select the next search result.
Select the previous search result.
Select all search results.
Replace the current match and move to next.
Replace all matches in the file.
Project Search
Focus or unfocus the project search panel.
Open search results in a new pane.
Show or hide search filters.
Expand or collapse all search results.
Toggle case-sensitive search.
Toggle whole-word search.
Toggle regular expression search.
Toggle replace mode in search.
Toggle search in selection only.
Project Panel Commands
Focus or unfocus the project panel.
Create a new file in the selected directory.
Create a new directory in the selected directory.
Rename the selected file or directory.
Duplicate the selected file or directory.
Move the selected file or directory to trash.Parameters:
skip_prompt: boolean - Skip confirmation prompt
Permanently delete the selected file or directory.Parameters:
skip_prompt: boolean - Skip confirmation prompt
Cut the selected file or directory.
Copy the selected file or directory.
Paste the cut or copied file or directory.
Copy the full path of the selected item.
Copy the relative path of the selected item.
Reveal the selected item in the system file manager.
Expand the selected directory.
Collapse the selected directory.
Collapse all directories in the tree.
Git Commands
Show git blame for the current file.
Open all modified files in the workspace.
Review git diff for staged/unstaged changes.
Show diff for the current file.
Restore the current file to HEAD state.
Toggle staging for the current hunk.
Stage the current hunk and move to the next.
Unstage the current hunk and move to the next.
Stage all changes in the workspace.
Unstage all staged changes.
Commit staged changes.
Amend the last commit with staged changes.
Fetch from remote repository.
Pull from remote repository.
Pull with rebase from remote repository.
Push to remote repository.
Force push to remote repository.
Focus or unfocus the git panel.
Agent (AI Assistant) Commands
Focus or unfocus the agent panel.
Create a new agent thread.
Create a new text-only agent thread.
Add the current selection to the agent thread.
Trigger inline AI assistance at cursor.
Insert the agent’s response into the editor.
Accept an agent suggestion (in diff view).
Reject an agent suggestion (in diff view).
Accept all agent suggestions.
Reject all agent suggestions.
Open agent settings.
Open agent thread history.
Show or hide the model selector.
Diagnostics Commands
Open the diagnostics panel.
Toggle automatic diagnostics refresh.
Debugger Commands
Start a debug session.
Stop the current debug session.
Continue execution (resume from breakpoint).
Pause execution.
Step over the current line.
Step into the function call.
Step out of the current function.
Restart the debug session.
Focus or unfocus the debug panel.
Task Commands
Run a task from the task menu.Parameters:
task_name: string - Specific task to runtask_tag: string - Run tasks with this tagreveal_target: string - Where to show output (“dock”, “center”)
Rerun the last task.Parameters:
reevaluate_context: boolean - Re-evaluate task context/variables
Terminal Commands
Clear the terminal output.
Copy selected text from terminal.
Paste text into terminal.
Show character palette (emoji picker).
Application Commands
Open the settings UI.
Open the settings JSON file in editor.
Open the keymap file in editor.
Quit the application.
Hide the application (macOS only).
Hide other applications (macOS only).
Minimize the current window.
Toggle full screen mode.
Increase editor font size.Parameters:
persist: boolean - Save the change to settings
Decrease editor font size.Parameters:
persist: boolean - Save the change to settings
Reset editor font size to default.Parameters:
persist: boolean - Save the change to settings
Open the extensions panel.
File Finder Commands
Open or close the file finder.
Show menu to choose split direction for opening files.
Show file type filter menu.
Command Palette
Open or close the command palette.
Theme Commands
Open the theme selector.
Language Commands
Open the language selector for current file.
Open the encoding selector for current file.
Menu Commands
Select the next item in a menu or list.
Select the previous item in a menu or list.
Select the first item in a menu or list.
Select the last item in a menu or list.
Confirm the selected menu item.
Cancel and close the menu.
Custom Commands
You can define custom commands by mapping them to existing actions in your keymap file: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.