CodeMirror keyboard shortcuts

CodeMirror
Ctrl + A

Select all

Esc

When multiple selections are present, deselect all but the primary selection

Ctrl + D

Delete line under the cursor

Ctrl + Z

Undo last change

Ctrl + Y

Redo the last undone change

Ctrl + U

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

Redo the last change to the selection, or the last text change if no selection changes remain

Ctrl + Home

Move cursor to the start of the document

Ctrl + End

Move cursor to the end of the document

Alt +

Move cursor to the start of the line

Home

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 +

Move cursor to the end of the line

Move the cursor up one line

Move the cursor down one line

Page Up

Move the cursor up one screen, and scroll up by the same distance

Page Down

Move the cursor down one screen, and scroll down by the same distance

Move the cursor one character left, going to the previous line when hitting the start of line

Move the cursor one character right, going to the next line when hitting the end of line

Ctrl +

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 +

Move to the right of the group after the cursor

↑   Shift + ⬅ Backspace

Delete the character before the cursor

Del

Delete the character after the cursor

Ctrl + ⬅ Backspace

Delete to the left of the group before the cursor

Ctrl + Del

Delete to the start of the group after the cursor

↑   Shift + ⭾ Tab

Auto-indent the current line or selection

Ctrl + ]

Indent the current line or selection by one indent unit

Ctrl + [

Dedent the current line or selection by one indent unit

⭾ Tab

If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character

⤶ Enter

Insert a newline and auto-indent the new line

Insert

Toggle the overwrite flag

Ctrl + S

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

Find

Ctrl + G

Find next

↑   Shift + Ctrl + G

Find previous

↑   Shift + Ctrl + F

Replace

↑   Shift + Ctrl + R

Replace all. Not defined by the core library, but defined in the search addon (or custom client addons)

Advertisement
⌘ Cmd + A

Select all

Ctrl + K

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

Delete line under the cursor

⌘ Cmd + ⬅ Backspace

Delete the part of the line from the left side of the visual line the cursor is on to the cursor

⌘ Cmd + Del

Delete the part of the line from the cursor to the right side of the visual line the cursor is on

⌘ Cmd + Z

Undo last change

↑   Shift + ⌘ Cmd + Z

Redo the last undone change

or ⌘ Cmd + Y
⌘ Cmd + U

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

Redo the last change to the selection, or the last text change if no selection changes remain

⌘ Cmd +

Move cursor to the start of the document

or ⌘ Cmd + Home
⌘ Cmd + End

Move cursor to the end of the document

or ⌘ Cmd +
Control + A

Move cursor to the start of the line

Home

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)

Control + E

Move cursor to the end of the line

⌘ Cmd +

Move the cursor to the right side of the visual line it is on

⌘ Cmd +

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

Move the cursor up one line

or Control + P

Move the cursor down one line

or Control + N
Page Up

Move the cursor up one screen, and scroll up by the same distance

or ↑   Shift + Control + V
Page Down

Move the cursor down one screen, and scroll down by the same distance

or Control + V

Move the cursor one character left, going to the previous line when hitting the start of line

or Control + B

Move the cursor one character right, going to the next line when hitting the end of line

or Control + F
⌥ Option +

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 +

Move to the right of the group after the cursor

↑   Shift + ⬅ Backspace

Delete the character before the cursor

or Control + H
Del

Delete the character after the cursor

or Control + D
⌥ Option + ⬅ Backspace

Delete up to the start of the word before the cursor

⌥ Option + D

Delete up to the end of the word after the cursor

⌥ Option + ⬅ Backspace

Delete to the left of the group before the cursor

Control + ⌥ Option + ⬅ Backspace

Delete to the start of the group after the cursor

or Alt + Del
↑   Shift + ⭾ Tab

Auto-indent the current line or selection

⌘ Cmd + ]

Indent the current line or selection by one indent unit

⌘ Cmd + [

Dedent the current line or selection by one indent unit

⭾ Tab

If something is selected, indent it by one indent unit. If nothing is selected, insert a tab character

Control + T

Swap the characters before and after the cursor

⤶ Enter

Insert a newline and auto-indent the new line

Insert

Toggle the overwrite flag

⌘ Cmd + S

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

Find

⌘ Cmd + G

Find next

↑   Shift + ⌘ Cmd + G

Find previous

⌘ Cmd + ⌥ Option + F

Replace

↑   Shift + ⌘ Cmd + ⌥ Option + F

Replace all. Not defined by the core library, but defined in the search addon (or custom client addons)


Share this page on:

Table of contents


Program information

Program name: CodeMirror (Developer tools)

CodeMirror is a JavaScript component, used to provide a code editor in a web browser. It has features like syntax highlighting, auto indentation, big document handling, customizable key bindings including Vi and Emacs modes.

Web page: https://codemirror.net


Similar programs


  1. Fortnite (PC)Fortnite (PC)
    18137    2
  2. SketchUpSketchUp
    13115   
  3. PlayerUnknown's BattlegPlayerUnknown's Battleg
    11409    2
  4. Keyboard symbolsKeyboard symbols
    8491   
  5. AMD Radeon ReLiveAMD Radeon ReLive
    7694    2
  6. Total CommanderTotal Commander
    7303   
More keyboard shortcuts...

Advertisement

Advertisement

  Subscribe to our mailing list!

Useful technology tips and keyboard shortcuts will appear in your inbox.

Your email is kept private and we don't spam.

What is your favorite CodeMirror hotkey? Do you have any useful tips for program? Let other users know below.