emacs key definition
2015-09-07 15:02
239 查看
Some Emacs commands are invoked by just one input event. Other commands take two or more input events to invokes, such as C-x 4 C-f.
A key sequence, or key for short, is a sequence of one or more input events that is meaningful as a unit.
If a key sequence invokes a command, we call it a complete key; for example, C-f, C-x C-f and C-x 4 C-f are all complete keys.
If a key sequence isn't long enough to invoke a command, we call it a prefix key; from the preceding example, we see that C-x and C-x 4 are prefix keys.
Every key sequence is either a complete key or a prefix key.
A prefix key combines with the following input event to make a longer key sequence.
For example, C-x is a prefix key, so typing C-x alone does not invoke a command; instead, Emacs waits for further input.
C-x combines with the next input event to make a two-event key sequence, which could itself be a prefix key (such as C-x 4), or a complete key (such as C-x C-f).
There is no limit to the length of key sequences, but in practice they are seldom longer than three or four input events.
You can't add input events onto a complete key. For example, because C-f is a complete key, the two-event sequence C-f C-k is two key sequenes, not one.
By default, the prefix keys in Emacs are:
C-c, C-h, C-x, C-x RET, C-x @, C-x a, C-x n, C-x r, C-x v, C-x 4, C-x 5, C-x 6,
ESC, M-g, and M-o. (F1 and F2 are aliases for C-h and C-x 6).
Typing the help character (C-h or F1) after a prefix key displays a list of the commands starting with that prefix.
The sole exception to this rule is ESC: ESC C-h is equivalent to C-M-h, which does something else entirely.
You can, however, use F1 to display a list of commands starting with ESC, ESC F1 NOT ESC C-h.
A key sequence, or key for short, is a sequence of one or more input events that is meaningful as a unit.
If a key sequence invokes a command, we call it a complete key; for example, C-f, C-x C-f and C-x 4 C-f are all complete keys.
If a key sequence isn't long enough to invoke a command, we call it a prefix key; from the preceding example, we see that C-x and C-x 4 are prefix keys.
Every key sequence is either a complete key or a prefix key.
A prefix key combines with the following input event to make a longer key sequence.
For example, C-x is a prefix key, so typing C-x alone does not invoke a command; instead, Emacs waits for further input.
C-x combines with the next input event to make a two-event key sequence, which could itself be a prefix key (such as C-x 4), or a complete key (such as C-x C-f).
There is no limit to the length of key sequences, but in practice they are seldom longer than three or four input events.
You can't add input events onto a complete key. For example, because C-f is a complete key, the two-event sequence C-f C-k is two key sequenes, not one.
By default, the prefix keys in Emacs are:
C-c, C-h, C-x, C-x RET, C-x @, C-x a, C-x n, C-x r, C-x v, C-x 4, C-x 5, C-x 6,
ESC, M-g, and M-o. (F1 and F2 are aliases for C-h and C-x 6).
Typing the help character (C-h or F1) after a prefix key displays a list of the commands starting with that prefix.
The sole exception to this rule is ESC: ESC C-h is equivalent to C-M-h, which does something else entirely.
You can, however, use F1 to display a list of commands starting with ESC, ESC F1 NOT ESC C-h.
相关文章推荐
- 将字符串形式的日期转换成日期对象
- sql server查询表的字段名和字段类型
- KVM Error:list.remove(x):x not in list
- 一个人的战斗
- Ember.js 入门指南——扩展(reopen)
- Ember.js 入门指南——扩展(reopen)
- 导入的项目,很多代码都提示错误
- zabbix安装-----linux下安装和配置mysql(编译安装)
- SIP中transaction和dialog的区别
- 年总—回顾收获,奋力前行
- linux下文件系统创建
- C#学习之Abstract和Virtual的区别
- Linux安装配置apache http://www.cnblogs.com/fly1988happy/archive/2011/12/14/2288064.html
- HttpServletResponse对象
- DB2错误信息SQLCODE SQLSTATE (按sqlcode排序)
- Light oj 1033 - Generating Palindromes(区间dp)
- HDU 3625 Examining the Rooms(第一类Stirling数)
- C++中随机函数rand()和srand()的用法
- ios开发系列之根据字典创建模型
- EntityFramework常用查询