keyname:
function
-name
or
macro
#keyname必须是英文,可以是Control-u、Control-k等。并且keyname和冒号之间不能有空格,如果有空格会被认为是keyname的一部分。keyname的写法多样,取决于自己的喜好。
#下面是一些键盘映射配置的例子:
Control-u: universal-argument C-u is bound to the
function
universal-argument
Meta-Rubout: backward-kill-word M-DEL is bound to the
function
backward-kill-word
Control-o:
"> output"
C-o is bound to run the macro expressed on the right hand side (that is, to insert the text ‘> output’ into the line)
Control-j: menu-complete C-j is bound to cycle through the available tab completions.
Control-k: menu-complete-backward C-k is bound to cycle backwards through the available tab completions.
"\t"
: menu-complete Use tab to cycle through all the possible completions.
"\C-p"
: history-search-backward Map control-p to allow search
for
completions to the current line from your history. e.g. type “git”
and
then hit control-p to cycle through all the recent git commands.
"\ep"
: history-search-backward Map escape-p to allow search
for
completions to the current line from your history. e.g. type “git”
and
then hit escape-p to cycle through all the recent git commands.
"\e[A"
: history-search-backward Map Up arrow to allow search
for
completions to the current line from your history. e.g. type “git”
and
then hit UP to cycle through all the recent git commands.
"\e[B"
: history-search-forward Map Down arrow to allow search
for
completions to the current line from your history. e.g. type “git”
and
then hit DOWN to cycle back through all the recent git commands.
"\C-d"
: kill-whole-line Map control-d to kill the whole line.