CodeMirror keyboard shortcuts

CodeMirror  

Zeynel Abidin Öztürk -
3 years ago
- Shortcuts
2
Ctrl + A

Select all

0
Esc

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

1
Ctrl + D

Delete line under the cursor

0
Ctrl + Z

Undo last change

0
Ctrl + Y

Redo the last undone change

0
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

0
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

0
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

0
β†’

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

0
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

0
↑   Shift + β­Ύ Tab

Auto-indent the current line or selection

0
Ctrl + ]

Indent the current line or selection by one indent unit

0
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

0
Insert

Toggle the overwrite flag

0
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

1
Ctrl + G

Find next

0
↑   Shift + Ctrl + G

Find previous

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

0
⌘ Cmd + A

Select all

0
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

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

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
βŒ₯ 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

0
βŒ₯ Option + β†’

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
βŒ₯ Option + β¬… Backspace

Delete up to the start of the word before the cursor

0
βŒ₯ Option + D

Delete up to the end of the word after the cursor

0
βŒ₯ Option + β¬… Backspace

Delete to the left of the group before the cursor

0
Control + βŒ₯ Option + β¬… Backspace

Delete to the start of the group after the cursor

0
or Alt + Del
0
↑   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 + βŒ₯ Option + F

Replace

0
↑   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:

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: 16 January 2021

How easy to press shortcuts: 82%

More information >>

Shortcut count: 91

Platform detected: Windows and macOS mixed

Similar programs



Advertisement

Join our mailing list!

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