# Keyboard Shortcuts

This appendix documents the "jEdit" keymap of keyboard shortcuts. Keymaps can be created and customized to suit your taste in the Shortcuts pane of the Utilities>Options dialog box; see .

Files

For details, see , and .

C+n | New file.
C+o | Open file.
C+w | Close buffer.
C+e C+w | Close all buffers.
C+s | Save buffer.
C+e C+s | Save all buffers.
C+p | Print buffer.
C+PAGE_UP | Go to previous buffer.
C+PAGE_DOWN | Go to next buffer.
C+` | Go to recent buffer.
A+` | Show buffer switcher.
C+q | Exit jEdit.

Views

For details, see .

C+e C+t | Turn gutter (line numbering) on and off.
C+0 | Remove split containing current text area only.
C+1 | Remove all splits.
C+2 | Split view horizontally.
C+3 | Split view vertically.
A+PAGE_UP | Send keyboard focus to previous text area.
A+PAGE_DOWN | Send keyboard focus to next text area.
C+e UP; LEFT; DOWN; RIGHT | Send keyboard focus to top; bottom; left; right docking area.
C+e C+` | Close currently focused docking area.

Action Bar

For details, see .

C+ENTER | Display the action bar and give it keyboard focus.
C+SPACE | Repeat last editor action.

Moving the Caret

For details, see , , , and .

Arrow | Move caret one character or line.
C+Arrow | Move caret one word or paragraph.
PAGE_UP; PAGE_DOWN | Move caret one screenful.
HOME | First non-whitespace character of line, beginning of line, first visible line (repeated presses).
END | Last non-whitespace character of line, end of line, last visible line (repeated presses).
C+HOME | Beginning of buffer.
C+END | End of buffer.
C+] | Go to matching bracket.
C+e [; ] | Go to previous; next bracket.
C+l | Go to line.

Selecting Text

For details, see , , , and .

S+Arrow | Extend selection by one character or line.
CS+Arrow | Extend selection by one word or paragraph.
S+PAGE_UP; S+PAGE_DOWN | Extend selection by one screenful.
S+HOME | Extend selection to first non-whitespace character of line, beginning of line, first visible line (repeated presses).
S+END | Extend selection to last non-whitespace character of line, end of line, last visible line (repeated presses).
CS+HOME | Extend selection to beginning of buffer.
CS+END | Extend selection to end of buffer.
C+[ | Select code block.
C+e w; l; p | Select word; line; paragraph.
C+e C+l | Select line range.
C+a | Select all.
ESCAPE | Select none.
A+\ | Switch between range and rectangular selection mode.
C+\ | Switch between single and multiple selection mode.
C+e i | Invert selection.

Scrolling

For details, see .

C+e C+j | Ensure current line is visible, and send focus to the text area.
C+e C+n | Center caret on screen.
C+'; C+/ | Scroll up; down one line.
A+'; A+/ | Scroll up; down one page.

Text Editing

For details, see , , , and .

C+z | Undo.
C+e C+z | Redo.
BACK_SPACE; DELETE | Delete character before; after caret.
C+BACK_SPACE; C+DELETE | Delete word before; after caret.
C+d; C+e d | Delete line; paragraph.
CS+BACK_SPACE; CS+DELETE | Delete from caret to beginning; end of line.
C+e r | Remove trailing whitespace from the current line (or all selected lines).
C+j | Join lines.
C+b | Complete word.
C+e f | Format paragraph (or selection).

Clipboard and Registers

For details, see .

C+x or S+DELETE | Cut selected text to clipboard.
C+c or C+INSERT | Copy selected text to clipboard.
C+e C+u | Append selected text to clipboard, removing it from the buffer.
C+e C+a | Append selected text to clipboard, leaving it in the buffer.
C+v or S+INSERT | Paste clipboard contents.
C+e C+p | Vertically paste clipboard contents.
C+r C+x key | Cut selected text to register key.
C+r C+c key | Copy selected text to register key.
C+r C+u key | Append selected text to register key, removing it from the buffer.
C+r C+a key | Append selected text to register key, leaving it in the buffer.
C+r C+v key | Paste contents of register key.
C+r C+p key | Vertically paste contents of register key.
C+e C+v | Paste previous.
C+e C+y | Paste deleted.

Markers

For details, see .

C+e C+m | If current line doesn't contain a marker, one will be added. Otherwise, the existing marker will be removed. Use the Markers menu to return to markers added in this manner.
C+t key | Add marker with shortcut key.
C+y key | Go to marker with shortcut key.
C+u key | Select to marker with shortcut key.
C+k key | Go to marker with shortcut key, and move the marker to the previous caret position.
C+e C+,; C+e C+. | Move caret to previous; next marker.

Search and Replace

For details, see .

C+f | Open search and replace dialog box.
C+g | Find next.
C+h | Find previous.
C+e C+b | Search in open buffers.
C+e C+d | Search in directory.
C+e C+r | Replace in selection.
C+e C+g | Replace in selection and find next.
C+, | Incremental search bar.
A+, | HyperSearch bar.
C+. | Incremental search for word under the caret.
A+. | HyperSearch for word under the caret.
C+e C+i | Toggle ignore case.
C+e C+x | Toggle regular expressions.

Source Code Editing

For details, see , and .

C+; | Expand abbreviation.
A+LEFT; A+RIGHT | Shift current line (or all selected lines) left; right.
S+TAB; TAB | Shift selected lines left; right. Note that pressing TAB with no selection active will insert a tab character at the caret position.
C+i | Indent current line (or all selected lines).
C+e C+c | Range comment selection.
C+e C+k | Line comment selection.

Folding and Narrowing

For details, see and .

A+BACK_SPACE | Collapse fold containing caret.
A+ENTER | Expand fold containing caret one level only.
AS+ENTER | Expand fold containing caret fully.
C+e x | Expand all folds.
C+e a | Add explicit fold.
C+e s | Select fold.
C+e ENTER key | Expand folds with level less than key, collapse all others.
C+e n n | Narrow to fold.
C+e n s | Narrow to selection.
A+UP; A+DOWN | Moves caret to previous; next fold.
C+e u | Moves caret to the parent fold of the one containing the caret.

Macros

For details, see .

C+m C+r | Record macro.
C+m C+m | Record temporary macro.
C+m C+s | Stop recording.
C+m C+p | Run temporary macro.

Alternative Shortcuts

A few frequently-used commands have alternative shortcuts intended to help you keep your hands from moving all over the keyboard.

A+j; A+l | Move caret to previous, next character.
A+i; A+k | Move caret up, down one line.
A+q; A+a | Move caret up, down one screenful.
A+z | First non-whitespace character of line, beginning of line, first visible line (repeated presses).
A+x | Last non-whitespace character of line, end of line, last visible line (repeated presses).