Bash Emacs Editing Mode Page 2

ADVERTISEMENT

Shortcut
Function Name
Description
Commands for Manipulating the History:
Return
accept-line
Accept the line regardless of where the cursor is.
C-p
previous-history
Fetch the previous command from the history list.
C-n
next-history
Fetch the next command from the history list.
M-
beginning-of-history
Move to the first line in the history.
M-
end-of-history
Move to the end of the input history (current line).
C-r
reverse-search-history
Search backward starting at the current line (incremental).
C-s
forward-search-history
Search forward starting at the current line (incremental).
M-p
non-incremental-reverse-
Search backward using non-incremental search.
search-history
M-n
non-incremental-forward-
Search forward using non-incremental search.
search-history
M-C-y
yank-nth-arg
Insert the n-th argument to the previous command at point.
M-. or M-
yank-last-arg
Insert the last argument to the previous command.
(unbound)
history-search-backward
Search forward for a string between start of line and point.
(unbound)
history-search-forward
Search backward for a string between start of line and point.
Completing:
TAB
complete
Attempt to perform completion on the text before point.
M-?
possible-completions
List the possible completions of the text before point.
M-*
insert-completions
Insert all completions of the text before point generated by
possible-completions.
(unbound)
menu-complete
Similar to complete but replaces the word with the first match.
(unbound)
delete-char-or-list
Deletes the car if not at the beginning of line or acts like possible-
completions at the end of the line.
Miscellaneous:
C-x C-r
re-read-init-file
Read and execute the contents of inputrc file.
C-g
abort
Abort the current editing command and ring the terminal’s bell.
M-a, M-b, M-x, ...
do-uppercase-version
If the metafield char x is lowercase, run the command that is
bound to uppercase char.
ESC
prefix-meta
Metafy the next character typed. For example, ESC-p is equiv-
alent to Meta-p.
C- or C-x C-u
undo
Incremental undo, separately remembered for each line.
M-r
revert-line
Undo all changes made to this line.
M-&
tilde-expand
Perform tilde expansion on the current word.
C-@ or M- space
set-mark
Set the mark to the point.
C-x C-x
exchange-point-and-mark
Swap the point with the mark.
C-]
character-search
Move to the next occurance of current character under cursor.
M-C-]
character-search-
Move to the previous occurrence of current character under cursor.
backward
M-#
insert-comment
Without argument line is commented, with argument uncom-
mented (if it was commented).
C-e
emacs-editing-mode
When in vi mode, switch to emacs mode.
M-C-j
vi-editing-mode
When in emacs mode, switch to vi mode.
M-0, M-1, ..., M–
digit-argument
Specify the digit to the argument. M– starts a negative argument.
(unbound)
dump-functions
Print all of the functions and their key bindings.
(unbound)
dump-variables
Print all of the settable variables and their values.
(unbound)
dump-macros
Print all of the key sequences bound to macros.
(unbound)
universal-argument
Either sets argument or multiplies the current argument by 4.
A cheat sheet by Peteris Krumins (peter@catonmat.net), 2007.
- good coders code, great reuse

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2