36 CodeMirror Keyboard Shortcuts

Learn CodeMirror Shortcuts for Windows & Mac

Most used CodeMirror Shortcuts

ActionCodeMirror Shortcuts WindowsCodeMirror Shortcuts Mac
Select allCtrl + ACommand + A
When multiple selections are present, deselect all but the primary selectionEscEsc
Delete the line under the cursorCtrl + DCommand + D
Undo last changeCtrl + ZCommand + Z
Redo the last undone changeCtrl + YCommand + Y
Undo the last changeCtrl + UCommand + U
Redo the last changeAlt + UOption + U
Move the cursor to the start of the documentCtrl + HomeCommand + Home
Move the cursor to the end of the documentCtrl + EndCommand + End
Move the cursor to the start of the lineAlt + Left Arrow keyOption + Left Arrow key
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)HomeHome
Move the cursor to the end of the lineAlt + Right Arrow keyOption + Right Arrow key
Move the cursor up one lineUp Arrow keyUp Arrow key
Move the cursor down one lineDown Arrow keyDown Arrow key
Move the cursor up one screen, and scroll up by the same distancePage Up keyPage Up key
Move the cursor down one screen, and scroll down by the same distancePage Down keyPage Down key
Move the cursor one character left, going to the previous line when hitting the start of the lineRight Arrow keyRight Arrow key
Move the cursor one character right, going to the next line when hitting the end of the lineLeft Arrow keyLeft Arrow key
Move to the left of the group before the cursor.Ctrl + Left Arrow keyCommand + Left Arrow key
Move to the right of the group after the cursorCtrl + Right Arrow keyCommand + Right Arrow key
Delete the character before the cursorShift +  BackspaceShift +  Backspace
Delete the character after the cursorDeleteDelete
Delete to the left of the group before the cursorCtrl +  BackspaceCommand +  Backspace
Delete to the start of the group after the cursorCtrl + DeleteCommand + Delete
Auto-indent the current line or selectionShift + TabShift + Tab
Indent the current line or selection by one indent unitCtrl + ]Command + ]
Dedent the current line or selection by one indent unitCtrl + [Command + [
If something is selected, indent it by one indent unit. If nothing is selected, insert a tab characterTabTab
Insert a new line and auto-indent the new lineEnterEnter
Toggle the overwrite flagInsertInsert
Not defined by the core library, only referred to in keymapsCtrl + SCommand + S
FindCtrl + FCommand + F
Find nextCtrl + GCommand + G
Find PreviousShift + Ctrl + GShift + Command + G
ReplaceShift + Ctrl + FShift + Command + F
Replace all. Not defined by the core library, but defined in the search addon (or custom client add-ons)Shift + Ctrl + RShift + Command + R

READ NEXT:

Back to top button