Skip to content
  1. Extras
  2. CMX
  3. Keyboard Shortcuts

Keyboard Shortcuts ​

In the tables, Mod means Ctrl on Windows/Linux and Cmd (⌘) on macOS. Alt on a Mac is Option (⌥). For letter commands where macOS inserts symbols instead of letters, CMX uses separate shortcuts without Option.

A complete cheat sheet is also available in the repository's COMMANDS.md file.

CMX and MODX ​

ActionWindows / LinuxmacOS
Save the MODX formCtrl+SCmd+S
Command paletteCtrl+Shift+PCmd+Shift+P
AutocompletionCtrl+SpaceCtrl+Space
Format the document or selectionShift+Alt+FCmd+Shift+F
Go to an element from a MODX tagCtrl + clickCmd + click
Select a lineClick its line numberClick its line number
Select a range of linesDrag across line numbersDrag across line numbers

The element palette opens with the { } button, history with the clock button, and quick settings with the gear button. Full-screen mode is enabled with a toolbar button; Esc restores the normal size.

Basic Commands ​

ActionWindows / LinuxmacOS
UndoCtrl+ZCmd+Z
RedoCtrl+Y or Ctrl+Shift+ZCmd+Shift+Z
Select allCtrl+ACmd+A
Find and replaceCtrl+FCmd+F
Go to lineCtrl+Alt+GCtrl+G
Toggle commentCtrl+/Cmd+/
Toggle block commentShift+Alt+AShift+Ctrl+A
Increase indentTab or Ctrl+]Tab or Cmd+]
Decrease indentShift+Tab or Ctrl+[Shift+Tab or Cmd+[
Automatically indent selectionCtrl+Alt+\Cmd+Alt+\
Go to matching bracketCtrl+Shift+\Cmd+Shift+\
Allow Tab to move focusCtrl+MShift+Ctrl+M

If there is an Emmet abbreviation before the cursor, Tab expands it first.

Lines ​

ActionWindows / LinuxmacOS
New line with automatic indentationEnter or Shift+EnterEnter or Shift+Enter
Insert a blank lineCtrl+EnterCmd+Enter
Move line/selection up or downAlt+↑ / Alt+↓Alt+↑ / Alt+↓
Copy line/selection up or downShift+Alt+↑ / Shift+Alt+↓Shift+Alt+↑ / Shift+Alt+↓
Delete lineCtrl+Shift+KCmd+Shift+K
Delete previous wordCtrl+BackspaceAlt+Backspace
Delete next wordCtrl+DeleteAlt+Delete
Delete to beginning of line-Cmd+Backspace
Delete to end of line-Cmd+Delete

Adding Shift to movement commands extends the selection.

ActionWindows / LinuxmacOS
By wordCtrl+← / Ctrl+→Alt+← / Alt+→
By syntax nodeAlt+← / Alt+→Ctrl+← / Ctrl+→
Beginning / end of lineHome / EndHome / End or Cmd+← / Cmd+→
Beginning / end of documentCtrl+Home / Ctrl+EndCmd+↑ / Cmd+↓
Select current lineAlt+LCtrl+L
Select parent nodeCtrl+ICmd+I
Collapse multiple selectionsEscEsc

Multiple Cursors ​

ActionWindows / LinuxmacOS
Cursor one line above / belowCtrl+Alt+↑ / Ctrl+Alt+↓Cmd+Alt+↑ / Cmd+Alt+↓
Next occurrence of word or selectionCtrl+DCmd+D
All occurrences of selectionCtrl+Shift+LCmd+Shift+L
Rectangular selectionAlt + dragAlt + drag
Undo last selection changeCtrl+UCmd+U
Redo undone selection changeAlt+UCmd+Shift+U

Search and Autocompletion ​

ActionShortcut
Open searchMod+F
Next matchF3 or Mod+G
Previous matchShift+F3 or Shift+Mod+G
Apply autocompletion suggestionEnter while the list is open
Close the listEsc
Expand EmmetTab

Sublime and Vim ​

With cmx.keymap = sublime, the standard commands remain available, and the current line can additionally be selected with Ctrl+L / Cmd+L.

With cmx.keymap = vim, Normal, Insert, Visual, and Visual Line modes are available, along with operators, motions, registers, and macros:

ActionCommand
Inserti, a, o, O
NormalEsc
Movementh, j, k, l, w, b, e, 0, ^, $, gg, G
Visual / Visual Linev / V
Delete character / linex / dd
Copy lineyy
Paste after / before cursorp / P
Undo / redou / Ctrl+R
Search/, then n and N
Macroq + register to record, @ + register to play