Skip to main content
marimo provides extensive keyboard shortcuts to help you edit notebooks efficiently. Whether you prefer standard keybindings or vim mode, marimo gives you powerful tools for navigating and editing cells without reaching for the mouse.

Viewing Shortcuts

Access the keyboard shortcuts reference:
  • Press Ctrl/Cmd+Shift+H to open the hotkeys menu
  • View shortcuts directly in the settings menu (⚙️ → Hotkeys)
The hotkeys menu shows platform-specific shortcuts (⌘ on Mac, Ctrl on Windows/Linux) and indicates which shortcuts you’ve customized.

Essential Shortcuts

These shortcuts work in both default and vim modes:

Cell Operations

Code Editing

Global Actions

Vim Mode

marimo supports vim keybindings for modal editing, bringing familiar vim workflows to notebook editing.

Enabling Vim Mode

Via UI:
  1. Open settings (⚙️)
  2. Navigate to “Keymap” tab
  3. Select “vim” preset
Via Configuration:
marimo.toml

Vim Mode Basics

Vim mode provides three modes:
  • Normal mode: Navigate and manipulate cells (press Esc to enter)
  • Insert mode: Edit cell content (press i, a, o, etc. to enter)
  • Visual mode: Select text (press v in normal mode)

Vim Keybindings

When vim mode is enabled: Normal mode (cell navigation): Insert mode (code editing):
  • Standard vim editing commands work within cells
  • Esc returns to normal mode
  • Ctrl+[ also exits to normal mode
Visual mode:
  • v enters character-wise visual mode
  • V enters line-wise visual mode
  • Ctrl+V enters block visual mode

Custom vimrc

Load custom vim keybindings from a vimrc file:
pyproject.toml
Or in user config:
marimo.toml
Example vimrc:
.vimrc
Not all vim features are supported. marimo implements core vim navigation and editing commands optimized for notebook workflows.

Custom Keybindings

Customize any shortcut to match your preferences.

Via Settings Menu

  1. Open settings (⚙️)
  2. Navigate to “Hotkeys” tab
  3. Click on a shortcut to edit
  4. Press your desired key combination
  5. Save changes

Via Configuration File

Edit keybindings in your marimo.toml:
marimo.toml
Key format:
  • Use + to combine modifier keys
  • Modifiers: Cmd, Ctrl, Shift, Alt
  • Use Cmd on Mac, Ctrl on Windows/Linux
  • Special keys: Enter, Space, Escape, Tab, Backspace, Delete
  • Arrow keys: Up, Down, Left, Right
  • Function keys: F1, F2, …, F12
Examples:

Available Actions

Here are all customizable keyboard shortcuts:

Productivity Tips

The command palette (Cmd/Ctrl+K) provides quick access to all marimo actions:
  • Search for commands by name
  • See keyboard shortcuts for each command
  • Execute commands without remembering shortcuts
  • Filter by category (cell, global, etc.)
Examples:
  • Type “format” to find formatting commands
  • Type “run” to see execution options
  • Type “fold” for code folding actions
Select multiple occurrences with Cmd/Ctrl+D:
  1. Place cursor on a variable name
  2. Press Cmd/Ctrl+D to select next occurrence
  3. Continue pressing to select more occurrences
  4. Edit all at once
Alternative: Cmd/Ctrl+Shift+L selects all occurrences at once
Create efficient workflows by chaining shortcuts:Add and run new cell:
  1. Cmd/Ctrl+B (create below)
  2. Type code
  3. Shift+Enter (run and create next)
Refactor with AI:
  1. Write initial code
  2. Cmd/Ctrl+Shift+E (AI refactor)
  3. Review and accept
Format and save:
  1. Cmd/Ctrl+Shift+F (format all)
  2. Cmd/Ctrl+S (save)
Adapt shortcuts to match your most common actions:
marimo.toml

Conflicting Shortcuts

marimo detects and warns about conflicting keybindings:
When conflicts occur:
  1. marimo shows a warning banner
  2. Click “View conflicts” to see which shortcuts conflict
  3. Reassign one of the conflicting shortcuts
  4. Conflicts are automatically resolved
Avoid assigning the same shortcut to multiple actions in different contexts (e.g., don’t use Cmd+B for both “bold” in markdown and “create cell below” globally).

Platform-Specific Behavior

marimo adapts shortcuts to your platform:

macOS

  • Cmd is the primary modifier (Command/⌘)
  • Ctrl used for navigation (Ctrl+Up/Down)
  • Some shortcuts also work with Ctrl for compatibility

Windows/Linux

  • Ctrl is the primary modifier
  • Windows: Alt behaves like Option on Mac
  • Linux: Follows standard Linux desktop conventions

Auto-Detection

marimo automatically detects your platform and shows the appropriate shortcuts in the UI and help menu.

Resetting Shortcuts

Restore default shortcuts: Reset individual shortcuts:
  1. Open settings → Hotkeys
  2. Click the shortcut you want to reset
  3. Press the reset button
Reset all shortcuts: Remove overrides from your config file:
marimo.toml
Or delete the entire [keymap] section to restore all defaults.

Accessibility

marimo provides keyboard accessibility features:
  • Full keyboard navigation: All features accessible without a mouse
  • Screen reader support: Proper ARIA labels on interactive elements
  • Focus indicators: Visual feedback for keyboard focus
  • Skip links: Jump to main content quickly
If you encounter accessibility issues, please report them on GitHub or reach out on Discord.

Troubleshooting

Possible causes:
  1. Browser conflicts: Some browsers capture certain shortcuts
    • Solution: Use marimo desktop app or try different browser
  2. OS shortcuts: Operating system may capture shortcuts
    • Solution: Customize conflicting shortcuts in marimo
  3. Extension conflicts: Browser extensions may intercept shortcuts
    • Solution: Disable extensions or use different shortcuts
Test shortcuts:
  1. Open command palette (Cmd/Ctrl+K)
  2. Search for the action
  3. See if shortcut is listed
  4. Try executing from palette instead
Check configuration:
Reload the page after changing vim mode settings.Ensure you’re in the correct mode:
  • Press Esc to enter normal mode
  • Look for mode indicator (if visible)
  • Try basic commands: j, k, dd
Check file permissions:
Ensure you have write permissions.Verify syntax:
Restart marimo after manual config edits.