Keybindings
This is the full list of Lem 2.0 keybindings.
You can get this list in Lem itself with M-x documentation-describe-bindings
(new after Lem 2.0).
The up to date list it to be found on Github: https://github.com/lem-project/lem/blob/main/docs/default-keybindings.md
Note: this doesn’t list vi-mode keys.
Command | Key bindings | Documentation |
---|---|---|
next-line | C-n, Down | Move the cursor to next line. |
next-logical-line | Move the cursor to the next logical line. | |
previous-line | C-p, Up | Move the cursor to the previous line. |
previous-logical-line | Move the cursor to the previous logical line. | |
forward-char | C-f, Right | Move the cursor to the next character. |
backward-char | C-b, Left | Move the cursor to the previous character. |
move-to-beginning-of-buffer | M-< | Move the cursor to the beginning of the buffer. |
move-to-end-of-buffer | M-> | Move the cursor to the end of the buffer. |
move-to-beginning-of-line | C-a, Home | Move the cursor to the beginning of the line. |
move-to-beginning-of-logical-line | Move the cursor to the beginning of the logical line. | |
move-to-end-of-line | C-e, End | Move the cursor to the end of the line. |
move-to-end-of-logical-line | Move the cursor to the end of the logical line. | |
next-page | C-v, PageDown | Move the cursor to the next page by one page. |
previous-page | M-v, PageUp | Move the cursor to the previous page by one page. |
next-page-char | C-x ] | Move the cursor to the next page character (^L). |
previous-page-char | C-x [ | Move the cursor to the previous page character (^L). |
goto-line | M-g | Move the cursor to the specified line number. |
Command | Key bindings | Documentation |
---|---|---|
self-insert | Insert the input character. | |
newline | Return | Insert a new line. |
open-line | C-o | Insert a new line without moving the cursor position. |
quoted-insert | C-q | Insert the next entered key (including control characters). |
delete-next-char | C-d, Delete | Delete the next character. |
delete-previous-char | C-h, Backspace | Delete the previous character. |
copy-region | M-w | Copy the text of region. |
copy-region-to-clipboard | Copy the selected text to the clipboard. | |
kill-region | C-w | Kill the text of region. |
kill-region-to-clipboard | Kill the text of region and copy to the clipboard. | |
kill-line | C-k | Kill from the current cursor position to the end of the line. |
kill-whole-line | C-Shift-Backspace | Kill the entire line and the remaining whitespace |
yank | C-y | Paste the copied text. |
yank-pop | M-y | Replaces the immediately pasted text with the next text in the killring. |
yank-pop-next | Replaces the immediately preceding yank-pop text with the text before the kill ring. | |
yank-to-clipboard | Copy the text of the killring to the clipboard. | |
paste-from-clipboard | Inserts text from the clipboard. | |
entab-line | Replaces the indent of the current line from space to tab. | |
detab-line | Replaces the indent of the current line from tab to space. | |
delete-blank-lines | C-x C-o | Delete blank lines before and after the cursor. |
just-one-space | M-Space | Combines consecutive whitespace before and after the cursor into one. |
delete-indentation | M-^ | Merge the current line with the previous line. |
transpose-characters | C-t | Swaps the characters before and after the cursor. |
undo | C-\ | Undo. |
redo | C-_, C-/ | Redo. |
delete-trailing-whitespace | Removes all end-of-line and end-of-buffer whitespace from the current buffer. |
Command | Key bindings | Documentation |
---|---|---|
mark-set | C-@, C-Space | Sets a mark at the current cursor position. |
exchange-point-mark | C-x C-x | Exchange the current cursor position with the marked position. |
mark-set-whole-buffer | C-x h | Select the whole buffer as a region. |
Command | Key bindings | Documentation |
---|---|---|
forward-word | M-f, C-Right | Move to cursor to next word. |
previous-word | M-b, C-Left | Move to cursor to previous word |
delete-word | M-d, C-Delete | Delete the next word. |
backward-delete-word | M-C-h, M-Backspace, C-Backspace | Delete the previous word. |
downcase-region | C-x C-l | Replaces the selected region with a downcase. |
uppercase-region | C-x C-u | Replaces the selected region with a uppercase. |
capitalize-word | M-c | Replace the following word with capital-case. |
lowercase-word | M-l | Replace the following word with lowercase. |
uppercase-word | M-u | Replace the following word with uppercase. |
forward-paragraph | M-} | Move cursor to forward paragraph. |
backward-paragraph | M-{ | Move cursor to backward paragraph. |
kill-paragraph | M-k | Kill the forward paragraph. |
count-words | M-= | Count the number of lines/words/characters in the buffer. |
Command | Key bindings | Documentation |
---|---|---|
forward-sexp | M-C-f | Move the cursor to the forward expression. |
backward-sexp | M-C-b | Move the cursor to the backward expression. |
forward-list | M-C-n | Move the cursor to the forward list. |
backward-list | M-C-p | Move the cursor to the backward list. |
down-list | M-C-d | Move the cursor to the inner expression. |
backward-up-list | M-C-u | Move the cursor to the outer expression. |
mark-sexp | M-C-@, M-C-Space | Select the forward expression as a region. |
kill-sexp | M-C-k | Kill the forward expression as a region. |
transpose-sexps | M-C-t | Swaps the expression before and after the cursor. |
Command | Key bindings | Documentation |
---|---|---|
find-file | C-x C-f | Open the file. |
find-file-recursively | Open a file, from the list of all files present under the buffer’s direcotry, recursively. | |
read-file | C-x C-r | Open the file as a read-only. |
save-current-buffer | C-x C-s | Saves the current buffer text to a file |
write-file | C-x C-w | Saves the text in the current buffer to the specified file |
write-region-file | Saves the region of text to the specified file | |
insert-file | C-x Tab | Inserts the contents of the file into the current buffer. |
save-some-buffers | C-x s | Save some files in the open buffer. |
revert-buffer | Restores the buffer. Normally this command will cause the contents of the file to be reflected in the buffer. | |
change-directory | Change directories associated with the buffer. |
Command | Key bindings | Documentation |
---|---|---|
project-find-file | Open a file, from the list of all files in this project. | |
project-root | Display this buffer’s project directory. | |
project-root-directory | Open this project’s root directory. | |
project-delete-buffers | Delete all this project’s buffers, except: if *delete-repl-buffer* is non t, we don’t delete the REPL buffer, if *delete-last-buffer* is non nil, we will delete the last buffer. This would cause Lem to exit. |
Command | Key bindings | Documentation |
---|---|---|
toggle-read-only | C-x C-q | Toggle the buffer read-only. |
rename-buffer | Rename the buffer. | |
unmark-buffer | M-~ | Remove the mark where the buffer was changed. |
Command | Key bindings | Documentation |
---|---|---|
select-buffer | C-x b | Switches to the selected buffer. |
kill-buffer | C-x k | Delete buffer. |
previous-buffer | C-x Left | Switches to the previous buffer. |
next-buffer | C-x Right | Switches to the next buffer. |
recenter | C-l | Scroll so that the cursor is in the middle. |
split-active-window-vertically | C-x 2 | Split the current window vertically. |
split-active-window-horizontally | C-x 3 | Split the current window horizontally. |
other-window | C-x o, M-o | Go to the next window. |
switch-to-last-focused-window | Go to the window that was last in focus. | |
window-move-down | Go to the window on the down. | |
window-move-up | Go to the window on the up. | |
window-move-right | Go to the window on the right. | |
window-move-left | Go to the window on the left. | |
delete-other-windows | C-x 1 | Delete all other windows. |
delete-active-window | C-x 0 | Delete the active window. |
quit-active-window | Quit the active window. This is a command for a popped-up window. | |
grow-window | C-x ^ | Grow the window’s height. |
shrink-window | C-x C-z | Shrink the window’s height. |
grow-window-horizontally | C-x } | Grow the window’s width. |
shrink-window-horizontally | C-x { | Shrink the window’s width. |
scroll-down | C-Down, M-Down | Scroll down. |
scroll-up | C-Up, M-Up | Scroll up. |
find-file-other-window | C-x 4 f | Open a file in another window. Split the screen vertically if needed. |
read-file-other-window | C-x 4 r | Read a file in another window. |
select-buffer-other-window | C-x 4 b | Select a buffer in another window. |
compare-windows |
Command | Key bindings | Documentation |
---|---|---|
add-cursors-to-next-line | M-C | Duplicates the cursor under the currently existing cursors. |
Command | Key bindings | Documentation |
---|---|---|
filter-buffer | C-x # | Replaces the contents of the buffer with the result of executing the command entered. |
pipe-command | C-x @ | Run a command and displays the output. |
Command | Key bindings | Documentation |
---|---|---|
describe-key | C-x ? | Tell what is the command associated to a keybinding. |
describe-bindings | Describe the bindings of the buffer’s current major mode. | |
list-modes | Output all available major and minor modes. | |
apropos-command | Find all symbols in the running Lisp image whose names match a given string. | |
lem-version | Display Lem’s version. |
Command | Key bindings | Documentation |
---|---|---|
font-size-increase | C-+ | Make the font larger (this currently only works with SDL2 frontend) |
font-size-decrease | C– | Make the font smaller (this currently only works with SDL2 frontend) |
Command | Key bindings | Documentation |
---|---|---|
nop-command | NopKey | |
undefined-key | Signal undefined key error. | |
keyboard-quit | C-g | Signal a quit condition. |
escape | Escape | Signal a quit condition silently. |
exit-lem | C-x C-c | Ask for modified buffers before exiting lem. |
quick-exit | Exit the lem job and kill it. | |
execute-command | M-x | Read a command name, then read the ARG and call the command. |
show-context-menu | Shift-F10, M-h | |
load-library | Load the Lisp library named NAME. |