Editor Features
Syntax Highlighting
The editor automatically detects file types and provides syntax highlighting for multiple languages:- JavaScript (.js)
- TypeScript (.ts)
- React (.jsx, .tsx)
- HTML (.html)
- CSS (.css)
- JSON (.json)
- Markdown (.md, .mdx)
- Python (.py)
Core Editing Features
Line Numbers & Gutters
Line Numbers & Gutters
- Line numbers displayed on the left
- Active line highlighting with gutter indicator
- Code folding gutter with expand/collapse icons
- Click line numbers to select lines
Selection & Cursor
Selection & Cursor
- Multiple cursor support for simultaneous editing
- Rectangular selection mode for block editing
- Crosshair cursor for precise selections
- Selection match highlighting shows all occurrences
Bracket Management
Bracket Management
- Auto-closing brackets, quotes, and parentheses
- Bracket matching highlights corresponding pairs
- Automatic indentation on new lines
- Indentation markers for visual structure
Code Intelligence
Autocompletion
The editor includes built-in autocompletion:- Context-aware suggestions
- Trigger with
Ctrl+Space - Navigate suggestions with arrow keys
- Accept with
Enter
Code Folding
Collapse and expand code blocks for better navigation:AI-Powered Features
AI Code Suggestions
Polaris provides intelligent code suggestions as you type:Suggestions appear automatically after a brief pause in typing (300ms debounce). They display as ghost text at your cursor position.
- Type your code normally
- Wait briefly - AI analyzes context from:
- Current line and cursor position
- Previous 5 lines
- Next 5 lines
- Full file content
- Suggestion appears as ghost text (40% opacity)
- Press
Tabto accept the suggestion
Quick Edit
Edit selected code using natural language instructions:Open Quick Edit
- Press
Cmd+K(Mac) orCtrl+K(Windows/Linux) - Or click “Quick Edit” in the selection tooltip
Describe your changes
Enter a natural language instruction like:
- “Add error handling”
- “Convert to async/await”
- “Add comments explaining the logic”
Selection Toolbar
When you select code, a toolbar appears with quick actions:- Add to Chat - Send selected code to the AI assistant for discussion
- Quick Edit (
⌘K) - Modify code with natural language
The toolbar automatically positions itself near your selection for easy access.
Editor Navigation
Tab Management
Manage multiple open files efficiently:- Single-click a file in the explorer opens it as a preview (italicized tab name)
- Double-click pins the file (normal tab name)
- Close tabs with the X button or by clicking another preview file
- Tabs show file type icons for quick identification
Minimap
The editor includes a minimap on the right side providing:- Overview of entire file content
- Visual navigation for long files
- Current viewport indicator
Keyboard Shortcuts
Editing
| Shortcut | Action |
|---|---|
Tab | Accept AI suggestion or indent |
Cmd/Ctrl+K | Quick Edit selected code |
Ctrl+Space | Trigger autocompletion |
Cmd/Ctrl+/ | Toggle line comment |
Tab (with selection) | Indent selection |
Shift+Tab | Outdent selection |
Navigation
| Shortcut | Action |
|---|---|
Cmd/Ctrl+F | Find in file |
Cmd/Ctrl+H | Find and replace |
Ctrl+Shift+[ | Fold code block |
Ctrl+Shift+] | Unfold code block |
History
| Shortcut | Action |
|---|---|
Cmd/Ctrl+Z | Undo |
Cmd/Ctrl+Shift+Z | Redo |
Theme
The editor uses a custom dark theme based on One Dark, with:- Syntax highlighting optimized for readability
- Consistent color scheme across file types
- Comfortable contrast ratios
- Custom gutter and selection colors