Opening the Command Palette
PressCmd+Shift+P to open the command palette overlay.
The palette appears as a centered overlay with:
- Search input at the top
- Filtered commands listed below with descriptions
- Keyboard navigation support
Available Commands
Rode’s command palette includes all major editor operations:Command Categories
- File Operations
- Editor Features
- Application
- New File: Create a new untitled file
- Open File: Browse and open an existing file
- Open Folder: Open a folder in the file tree
- Save File: Save the current file
- Save As: Save with a new name/location
Using the Command Palette
Search Filtering
The command palette filters in real-time as you type:- Case-insensitive matching
- Substring matching (“file” matches “Open File”, “Save File”, “New File”)
- Shows all commands when input is empty
- Instant filtering as you type
Examples
Search: 'save'
Search: 'save'
Returns:
- Save File
- Save As
Search: 'open'
Search: 'open'
Returns:
- Open File
- Open Folder
- (Also matches “Open theme settings” via description)
Search: 'term'
Search: 'term'
Returns:
- Toggle Terminal
Search: 'set'
Search: 'set'
Returns:
- Settings
- (Also matches “Open theme settings”)
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd+Shift+P | Open command palette |
↑ | Select previous command |
↓ | Select next command |
Enter | Execute selected command |
Escape | Close palette |
The command palette automatically focuses the search input when opened, so you can start typing immediately.
Command Structure
Each command has two properties:The command’s display name (shown in bold)
A brief explanation of what the command does
Integration with Other Features
The command palette integrates seamlessly with other Rode features:Vim Command Mode
Vim-style commands (:w, :q, etc.) are translated to command palette commands:
Keyboard Shortcuts
Most keyboard shortcuts trigger the same commands as the palette:Cmd+S= “Save File” commandCmd+O= “Open Folder” commandCmd+N= “New File” commandCmd+J= “Toggle Terminal” command
Menu Integration
Command names match exactly with menu item labels for consistency.Implementation Details
State Management
open: Controls palette visibilityinput: Current search querycommands: Master list of all commands (immutable)filtered_commands: Subset matching current search
Toggle Behavior
- Clears previous search input
- Resets filtered list to show all commands
- Focuses the search input field
- Hides the overlay
- Clears search state
- Empties filtered list
Extending the Command Palette
To add new commands to the palette:- Define the command in the
commandsvector (src/command_palette.rs:19-60) - Handle execution in
execute_palette_command(src/app.rs) - Map keyboard shortcuts if desired (src/app.rs:1022-1051)
Design Philosophy
Rode’s command palette follows these principles:Discoverability
All features accessible in one place with descriptions
Speed
Instant filtering and keyboard-driven navigation
Consistency
Command names match throughout the UI (menus, shortcuts, Vim mode)
Simplicity
Clear, concise command names and descriptions
Future Enhancements
Planned improvements:Fuzzy Matching
Implement intelligent fuzzy matching like the file finder (e.g., “sf” matches “Save File”)