Article View: cn.comp.os.linux
Article #10754Re: 建议大家来个Emacs教学连载
From: 进化的鱼
Date: Wed, 11 Jun 2003 10:38
Date: Wed, 11 Jun 2003 10:38
241 lines
10208 bytes
10208 bytes
>>>>> "b8" == b8 <dingwei@handsome.com.cn> writes:
b8> ���̳�ѧ̫��,������˵˵���õ�ʮ�������~~~~~~~~~~
�����������Ǻǣ�
--8<---------------cut here---------------start------------->8---
=== д��ǰ�� ===
`C-' Control-
`M-' Meta-, �� Alt-, �� Esc
`C-M-' Control-Alt-
point λ�㣬�������½�
mark ��ǣ�����������
region ����mark��point֮���Ϊregion
RET �س���
TAB �Ʊ��
ESC ESC��
SPC �ո��
=== ���֪�� ===
C-x C-c �˳�Emacs
C-z
C-x C-z ����Emacs
C-x C-f ��һ���ļ�
C-x i ����һ���ļ�
C-x C-r ֻ����ʽ��һ���ļ�
C-x u Undo( ��ҪRedo����һ�¹����Undo :)
C-x C-s �����ļ�
C-x s ѯ�ʱ�������δ�����ļ�
C-x C-w �ļ����Ϊ��
C-l ˢ�´��ڣ�������ǰ�������������ġ�������������
��ǰ�е�λ�ã��������� M-0 C-l �� M-- C-l
C-g �˳���ǰ�������㲻֪��Emacs���ڸ�ʲô�أ��ఴ����
C-g���ͻ�ָ�����״̬
=== ���߰��� ===
C-h t TUTORIAL
C-h i Online Info
C-h c ��������У���Ƽ����������
C-h w ���������ָ����İ�
=== ��������� ===
C-u �����ǰ
M-0
...
M-9 ����0...9
M-- ������
=== �����ƶ� ===
C-a ����
C-e ��β
C-n ��һ��
C-p ��һ��
C-f ǰ��һ���ַ�
C-b ����һ���ַ�
M-f ǰ��һ����
M-b ����һ����
=== �������滻 ===
C-s ��������
C-r �����������
M-x search-forward
����
M-x search-backward
�������
C-M-s
M-x isearch-forward-regexp
������ʽ��������
C-M-r
M-x isearch-backward-regexp
������ʽ�����������
M-x search-forward-regexp
������ʽ����
M-x search-backward-regexp
������ʽ�������
ESC % ѯ���滻
M-x query-replace-regexp
������ʽѯ���滻
M-x replace-string �滻
M-x replace-regexp ������ʽ�滻
===����Ŀ�����ճ��===
* ������Mark��Point֮��IJ��֣�Point���ǹ������½ǣ�Mark���������á�
* `Yanking ring'��һ������ı��ĵط�������������Կ���ɾ��(kill)���ı���
* `Yanking'��ʾ����ո�ɾ��(kill)���ı���
C-SPC
C-@
M-x set-mark-command
���� mark
C-x C-x ���� mark �� point
C-w ��������ı�ɾ�����yanking ring��
M-w ��������yanking ring��
C-y ��yanking ring�����һ��������뵱ǰ������
M-y ��һ��C-y��ΰ�M-y������yanking ring�е�����������
���ող��������
C-o �ڹ�����������
C-x C-o ����긽��Ŀ���ȥ�������е�ʱ��һ��ֻʣһ�У��ڶ�
��ȫ��ɾ��
C-d ɾ��һ���ַ���yank��
M-d ɾ���긽���һ����
C-x h ������������������������mark������point��
C-k ɾ��kill���ӹ�괦����β
=== ��༭ ===
C-q ������һ�����ַ�,��������ַ�`^X'�á�C-q C-x��
C-t ���������ַ�
M-t ����������
C-x C-t ��������
C-x = ��ʾ��������ַ����Ϣ
C-v ���¹�������
M-v ���Ϲ�������
=== �ര�ںͶ���� ===
C-x b ת����һ��������
C-x k ɾ�����
C-x 2 ˮƽ�ָ�����
C-x 3 ��ֱ�ָ��
C-x 1 ȥ�������
ESC ESC ESC ͬ��
C-x 0 ȥ����ǰ����
C-x o ��굽��һ��������
C-M-v ���¹�����һ�����ڣ���һ�����IJ��������Ϲ���
=== �� ===
C-x ( ��ʼһ����Ķ���
C-x ) ����һ����Ķ���
C-x e ִ�к�
M-x name-last-kbd-macro
�����һ��������
M-x insert-kbd-macro
�ڵ�ǰ�ļ��в���һ���Ѷ��岢�����ĺ�
=== ����������� ===
* ����������������� Mark �� Point ȷ���ġ�
C-x r t ����������
C-x r o ����հľ�������
C-x r y ����֮ǰɾ��ľ�������
C-x r k ɾ���������
C-x r c ����ǰ�����������
--8<---------------cut here---------------end--------------->8---
--8<---------------cut here---------------start------------->8---
== C/C++ ģʽ ==
ָ��ΪC++ģʽ�ķ�����һ������չ���Զ��趨������ָ����������ʱ����ϣ
��.h�ļ���C++ģʽ�ģ�ȱʡ��Cģʽ�������ļ���һ�У�����ĩβ���ϼ���
// -*- C++ -*-
�����������Cģʽר�У�˳����һ�£�M-x global-font-lock-mode RET ��
��.emacs�м���(global-font-lock-mode t)����console�£�Emacs21��֧����
�������������������ͬ�ؼ����ò�ͬ����ɫ��ͻ����
��ģʽ��
auto-state ��������ʱ�Զ������Զ�����
hungry-state ����Backspaceʱ���Զ�ɾ����ܶ�ĿհͿ���
C-c C-t ͬʱת��(��/��)auto-state��hungry-state��ģʽ
C-c C-a ת�� auto-state ��ģʽ
C-c C-d ת�� hungry-state ��ģʽ
C-c . ����������TAB����г����õķ��ȱʡ��Ϊgnu����
����Ϊ2���ַ�linuxΪ8����k&rΪ5������
TAB ��������ǰ��
M-/ �Զ����루�����������ҵõ��Ĵ���
M-; ��β����ע��
C-c C-e ��չ��
C-c C-c ��������ע��
C-c C-\ �������е�ÿһ�н�β������һ��'\'�ַ�
=== ����͵��� ===
M-x compile RET ����
M-x gdb RET ����
C-x ` ��������Ϣ�У���һ������һ��������ʾ������Ϣ����һ��
��ʾԴ��ij���λ��
����gdb�����������Դ���ļ���������ʱ��
C-x SPC �ڵ�ǰ�����öϵ�
C-x C-a C-s step
C-x C-a C-n next
C-x C-a C-t tbreak
C-x C-a C-r continue
--8<---------------cut here---------------end--------------->8---
--
~~һ�쵽��~�����~~
email: (rot13 "qqqxx@fvan.pbz")
Technical Details
Message-ID:
<m2vfvcnbk5.fsf@db.hit.edu.cn>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!spring.edu.tw!news.nctu.edu.tw!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mailReferences:
<u65nd1b60.fsf@handsome.com.cn>Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: 10b277,e0175766c9b18797 X-Google-Attributes: gid10b277,public X-Google-ArrivalTime: 2003-06-11 03:37:42 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!spring.edu.tw!news.nctu.edu.tw!newsgate.cuhk.edu.hk!news.cn99.com!not-for-mail From: o.oO@Oo.o (进化的鱼) Newsgroups: cn.comp.os.linux Subject: Re: 建议大家来个Emacs教学连载 Date: Wed, 11 Jun 2003 18:38:50 +0800 Organization: Bentium Ltd. (CN99) Lines: 241 Message-ID: <m2vfvcnbk5.fsf@db.hit.edu.cn> References: <u65nd1b60.fsf@handsome.com.cn> NNTP-Posting-Host: 61.167.60.204 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Trace: mail.cn99.com 1055327850 76437 61.167.60.204 (11 Jun 2003 10:37:30 GMT) X-Complaints-To: usenet@news.cn99.com NNTP-Posting-Date: Wed, 11 Jun 2003 10:37:30 +0000 (UTC) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:PUo3FcfD+cDZkBgFOxPd+itW9OA=