Hotkeys and shortcuts for CodeMirror

(Total 77)

Ctrl + A
General (Windows)
Select all
Esc
General (Windows)
When multiple selections are present, deselect all but the primary selection
Ctrl + D
General (Windows)
Delete line under the cursor
Ctrl + Z
General (Windows)
Undo last change
Ctrl + Y
General (Windows)
Redo the last undone change
Ctrl + U
General (Windows)
Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change
Alt + U
General (Windows)
Redo the last change to the selection, or the last text change if no selection changes remain
Ctrl + Home
General (Windows)
Move cursor to the start of the document
Ctrl + End
General (Windows)
Move cursor to the end of the document
Alt +
General (Windows)
Move cursor to the start of the line
Home
General (Mac)
Move to the start of the text on the line, or if we are already there, go to the actual start of the line (including whitespace)
Alt +
General (Windows)
Move cursor to the end of the line
General (Mac)
Move the cursor up one line
General (Mac)
Move the cursor down one line
Page Up
General (Mac)
Move the cursor up one screen, and scroll up by the same distance
Page Down
General (Mac)
Move the cursor down one screen, and scroll down by the same distance
General (Mac)
Move the cursor one character left, going to the previous line when hitting the start of line
General (Mac)
Move the cursor one character right, going to the next line when hitting the end of line
Ctrl +
General (Windows)
Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character
Ctrl +
General (Windows)
Move to the right of the group after the cursor
↑   Shift + ⬅ Backspace
General (Mac)
Delete the character before the cursor
Del
General (Mac)
Delete the character after the cursor
Ctrl + ⬅ Backspace
General (Windows)
Delete to the left of the group before the cursor
Ctrl + Del
General (Windows)
Delete to the start of the group after the cursor
↑   Shift + ⭾ Tab
General (Mac)
Auto-indent the current line or selection
Ctrl + ]
General (Windows)
Indent the current line or selection by one indent unit
Ctrl + [
General (Windows)
Dedent the current line or selection by one indent unit
⭾ Tab
General (Mac)
If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character
⤶ Enter
General (Mac)
Insert a newline and auto-indent the new line
Insert
General (Mac)
Toggle the overwrite flag
Ctrl + S
General (Windows)
Not defined by the core library, only referred to in key maps. Intended to provide an easy way for user code to define a save command
Ctrl + F
General (Windows)
Find
Ctrl + G
General (Windows)
Find next
↑   Shift + Ctrl + G
General (Windows)
Find previous
↑   Shift + Ctrl + F
General (Windows)
Replace
↑   Shift + Ctrl + R
General (Windows)
Replace all. Not defined by the core library, but defined in the search addon (or custom client addons)
⌘ Cmd + A
General (Mac)
Select all
Ctrl + K
General (Mac)
Emacs-style line killing. Deletes the part of the line after the cursor. If that consists only of whitespace, the newline at the end of the line is also deleted
⌘ Cmd + D
General (Mac)
Delete line under the cursor
⌘ Cmd + ⬅ Backspace
General (Mac)
Delete the part of the line from the left side of the visual line the cursor is on to the cursor
⌘ Cmd + Del
General (Mac)
Delete the part of the line from the cursor to the right side of the visual line the cursor is on
⌘ Cmd + Z
General (Mac)
Undo last change
↑   Shift + ⌘ Cmd + Z
General (Mac)
Redo the last undone change
⌘ Cmd + Y
General (Mac)
Redo the last undone change
⌘ Cmd + U
General (Mac)
Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change
↑   Shift + ⌘ Cmd + U
General (Mac)
Redo the last change to the selection, or the last text change if no selection changes remain
⌘ Cmd +
General (Mac)
Move cursor to the start of the document
⌘ Cmd + Home
General (Mac)
Move cursor to the start of the document
⌘ Cmd + End
General (Mac)
Move cursor to the end of the document
⌘ Cmd +
General (Mac)
Move cursor to the end of the document
Control + A
General (Mac)
Move cursor to the start of the line
Control + E
General (Mac)
Move cursor to the end of the line
⌘ Cmd +
General (Mac)
Move the cursor to the right side of the visual line it is on
⌘ Cmd +
General (Mac)
Move the cursor to the left side of the visual line it is on. If this line is wrapped, that may not be the start of the line
Control + P
General (Mac)
Move the cursor up one line
Control + N
General (Mac)
Move the cursor down one line
↑   Shift + Control + V
General (Mac)
Move the cursor up one screen, and scroll up by the same distance
Control + V
General (Mac)
Move the cursor down one screen, and scroll down by the same distance
Control + B
General (Mac)
Move the cursor one character left, going to the previous line when hitting the start of line
Control + F
General (Mac)
Move the cursor one character right, going to the next line when hitting the end of line
⌥ Option +
General (Mac)
Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character
⌥ Option +
General (Mac)
Move to the right of the group after the cursor
Control + H
General (Mac)
Delete the character before the cursor
Control + D
General (Mac)
Delete the character after the cursor
⌥ Option + ⬅ Backspace
General (Mac)
Delete to the left of the group before the cursor
⌥ Option + D
General (Mac)
Delete up to the end of the word after the cursor
Control + ⌥ Option + ⬅ Backspace
General (Mac)
Delete to the start of the group after the cursor
Alt + Del
General (Mac)
Delete to the start of the group after the cursor
⌘ Cmd + ]
General (Mac)
Indent the current line or selection by one indent unit
⌘ Cmd + [
General (Mac)
Dedent the current line or selection by one indent unit
Control + T
General (Mac)
Swap the characters before and after the cursor
⌘ Cmd + S
General (Mac)
Not defined by the core library, only referred to in key maps. Intended to provide an easy way for user code to define a save command
⌘ Cmd + F
General (Mac)
Find
⌘ Cmd + G
General (Mac)
Find next
↑   Shift + ⌘ Cmd + G
General (Mac)
Find previous
⌘ Cmd + ⌥ Option + F
General (Mac)
Replace
↑   Shift + ⌘ Cmd + ⌥ Option + F
General (Mac)
Replace all. Not defined by the core library, but defined in the search addon (or custom client addons)