Overview
Glass features a powerful code editor built on a custom rendering engine designed for performance and extensibility. The editor supports all modern code editing workflows with features like multiple cursors, syntax-aware navigation, and intelligent text manipulation.Multiple Cursors
Glass supports sophisticated multi-cursor editing for efficient text manipulation across multiple locations simultaneously.Adding Cursors
Multi-Cursor Features
- Columnar Selection: Create vertical selections with
BeginColumnarmode - Skip Soft Wrap: Configure whether cursors skip soft-wrapped lines
- Multi-Cursor Modifier: Customize modifier keys (Alt or Cmd/Ctrl) for multi-cursor operations
Find and Replace
Powerful search and replace capabilities integrated directly into the editor.- Find
- Replace
FindNextMatch: Navigate to the next search matchFindPreviousMatch: Navigate to the previous search matchFindAllReferences: Find all references to a symbol across the project
Selection and Navigation
Smart Selection
The editor provides syntax-aware selection commands:SelectLargerSyntaxNode: Expand selection to encompassing syntax nodeSelectSmallerSyntaxNode: Contract selection to smaller syntax nodeSelectNextSyntaxNode: Move to next sibling syntax nodeSelectPreviousSyntaxNode: Move to previous sibling syntax nodeSelectEnclosingSymbol: Select the entire enclosing symbol
Movement Commands
Line Navigation
MoveLineUp/MoveLineDown: Move entire linesMoveToBeginningOfLine/MoveToEndOfLine: Jump to line boundariesMovePageUp/MovePageDown: Navigate by pages
Word Navigation
MoveToNextWordEnd/MoveToPreviousWordStart: Jump by wordsMoveToNextSubwordEnd/MoveToPreviousSubwordStart: Jump by camelCase/snake_case parts
Code Manipulation
Line Operations
Text Transformation
Convert selected text between various cases:Case Styles
ConvertToUpperCaseConvertToLowerCaseConvertToTitleCaseConvertToSentenceCase
Programming Cases
ConvertToUpperCamelCaseConvertToLowerCamelCaseConvertToSnakeCaseConvertToKebabCase
Other
ConvertToOppositeCaseConvertToRot13ConvertToRot47
Code Actions
ToggleCodeActions: Display available code actions at cursorConfirmCodeAction: Apply selected code action- Format:
Format(entire document) orFormatSelections(selected text only) - Organize Imports:
OrganizeImports
Folding and Visibility
Code Folding
Manage code visibility with powerful folding commands:Fold/Unfold: Toggle folding at cursorFoldAll/UnfoldAll: Fold/unfold all foldable regionsFoldRecursive/UnfoldRecursive: Recursive folding operationsFoldFunctionBodies: Fold all function bodies for overviewFoldAtLevel1throughFoldAtLevel9: Fold at specific indentation levels
Excerpts
Work with code excerpts in multibuffer views:ExpandExcerpts: Expand all excerpts by specified linesExpandExcerptsUp/ExpandExcerptsDown: Expand in specific directionsOpenExcerpts/OpenExcerptsSplit: Open excerpts in new or split view
Editor Display
Visual Enhancements
- Guides and Hints
- Line Numbers
- Diagnostics
ToggleIndentGuides: Show/hide indentation guidesToggleInlayHints: Display inline type hints and parameter namesToggleInlineValues: Show variable values during debugging
Minimap
ToggleMinimap: Show/hide the code minimap for navigation- Configurable minimap settings in
EditorSettings
The minimap uses a specialized
MINIMAP_FONT_SIZE of 2 pixels for rendering efficiency.Git Integration
Diff Viewing
ExpandAllDiffHunks/CollapseAllDiffHunks: Manage diff visibilityToggleSelectedDiffHunks: Toggle specific diff hunksGoToHunk/GoToPreviousHunk: Navigate between changesApplyDiffHunk/ApplyAllDiffHunks: Apply changes from diffs
Git Blame
ToggleGitBlameInline: Display git blame information inlineBlameHover: Show blame info on hoverOpenGitBlameCommit: Open the full commit for current blame
Advanced Features
Snippets
- Insert predefined code snippets
- Navigate snippet tabstops with
NextSnippetTabstop/PreviousSnippetTabstop - Language-specific snippet support
Breadcrumbs
Navigate code structure with breadcrumb navigation showing current symbol context.Hyperlinks
OpenUrl: Open URLs at cursor positionOpenSelectedFilename: Open file paths in selectionCopyPermalinkToLine: Copy shareable link to current lineOpenPermalinkToLine: Open permalink in browser
Language Server Integration
Navigation
GoToDefinition/GoToDefinitionSplitGoToDeclaration/GoToDeclarationSplitGoToImplementation/GoToImplementationSplitGoToTypeDefinition/GoToTypeDefinitionSplit
Information
Hover: Show symbol informationShowSignatureHelp: Display function signaturesShowCompletions: Trigger code completionRename: Rename symbol across project
Performance
The editor is optimized for performance:- Custom rendering engine with efficient text layout
- Display map system for handling folds, wraps, and inlays efficiently
- Debounced operations (code actions: 250ms, selection highlight: 100ms)
- Configurable timeouts for LSP operations