CodeMirror keyboard shortcuts 

CodeMirror    

Zeynel -
7 years ago
- Shortcuts
3
Ctrl + A

Select all

1
Esc

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

2
Ctrl + D

Delete line under the cursor

2
Ctrl + Z

Undo last change

4
Ctrl + Y

Redo the last undone change

-3
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

-2
Alt + U

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

0
Ctrl + Home

Move cursor to the start of the document

0
Ctrl + End

Move cursor to the end of the document

1
Alt +

Move cursor to the start of the line

0
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)

0
Alt +

Move cursor to the end of the line

0

Move the cursor up one line

0

Move the cursor down one line

0
Page Up

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

0
Page Down

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

0

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

1

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

1
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

0
Ctrl +

Move to the right of the group after the cursor

0
↑  Shift + Backspace

Delete the character before the cursor

0
Del

Delete the character after the cursor

1
Ctrl + Backspace

Delete to the left of the group before the cursor

0
Ctrl + Del

Delete to the start of the group after the cursor

3
↑  Shift + Tab

Auto-indent the current line or selection

-2
Ctrl + ]

Indent the current line or selection by one indent unit

2
Ctrl + [

Dedent the current line or selection by one indent unit

0
Tab

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

0
⤶ Enter

Insert a newline and auto-indent the new line

1
Insert

Toggle the overwrite flag

2
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

0
Ctrl + F

Find

2
Ctrl + G

Find next

0
↑  Shift + Ctrl + G

Find previous

3
↑  Shift + Ctrl + F

Replace

0
↑  Shift + Ctrl + R

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

Advertisement

0
⌘ Cmd + A

Select all

1
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

0
⌘ Cmd + D

Delete line under the cursor

1
⌘ Cmd + Backspace

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

0
⌘ Cmd + Del

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

0
⌘ Cmd + Z

Undo last change

0
↑  Shift + ⌘ Cmd + Z

Redo the last undone change

0
or ⌘ Cmd + Y
0
⌘ 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

0
↑  Shift + ⌘ Cmd + U

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

0
⌘ Cmd +

Move cursor to the start of the document

0
or ⌘ Cmd + Home
0
⌘ Cmd + End

Move cursor to the end of the document

0
or ⌘ Cmd +
0
Control + A

Move cursor to the start of the line

0
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)

0
Control + E

Move cursor to the end of the line

0
⌘ Cmd +

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

0
⌘ 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

0

Move the cursor up one line

0
or Control + P
0

Move the cursor down one line

Advertisement

0
or Control + N
0
Page Up

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

0
or ↑  Shift + Control + V
0
Page Down

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

0
or Control + V
0

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

0
or Control + B
0

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

0
or Control + F
0
⌥ Opt +

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

0
⌥ Opt +

Move to the right of the group after the cursor

0
↑  Shift + Backspace

Delete the character before the cursor

0
or Control + H
0
Del

Delete the character after the cursor

0
or Control + D
0
⌥ Opt + Backspace

Delete up to the start of the word before the cursor

0
⌥ Opt + D

Delete up to the end of the word after the cursor

0
⌥ Opt + Backspace

Delete to the left of the group before the cursor

0
Control + ⌥ Opt + Backspace

Delete to the start of the group after the cursor

0
or Alt + Del
2
↑  Shift + Tab

Auto-indent the current line or selection

0
⌘ Cmd + ]

Indent the current line or selection by one indent unit

0
⌘ Cmd + [

Dedent the current line or selection by one indent unit

0
Tab

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

0
Control + T

Swap the characters before and after the cursor

0
⤶ Enter

Insert a newline and auto-indent the new line

0
Insert

Toggle the overwrite flag

0
⌘ 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

0
⌘ Cmd + F

Find

0
⌘ Cmd + G

Find next

0
↑  Shift + ⌘ Cmd + G

Find previous

0
⌘ Cmd + ⌥ Opt + F

Replace

0
↑  Shift + ⌘ Cmd + ⌥ Opt + F

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


Share this page on:
Is this page helpful?
0 0

Program information

Program name: CodeMirror 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: codemirror.net

Last update: 1/16/2021 8:54 AM UTC

How easy to press shortcuts: 82%

More information >>

Shortcut count: 91

Platform detected: Windows and macOS mixed

Similar programs



User operations

Add CodeMirror to your list of favorites

Advertisement


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


Only registered users can post links.
 
? yurenchen OP says: 3 years ago 12/12/2021 10:04 AM
I wonder how to move line up/down use shortcuts?
( as alt+up/down in vscode )