annotate etc/TUTORIAL.zh @ 90159:08185296b491

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-44 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 272-288) - src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field. - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 67) - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 05 May 2005 00:04:55 +0000
parents 7a3341d65a12
children 2d92f5c9d6ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61221
ee24a0da4818 TUTORIAL.pt_BR, TUTORIAL.cn, TUTORIAL.cs, TUTORIAL.de, TUTORIAL.fr, TUTORIAL.it, TUTORIAL.ja, TUTORIAL.ko, TUTORIAL.pl, TUTORIAL.pt_BR, TUTORIAL.ro, TUTORIAL.ru, TUTORIAL.sk, TUTORIAL.sl, TUTORIAL.th, TUTORIAL.zh: Fix title line. TUTORIAL.bg: Fix title line; Applied TUTORIAL changes in revision 1.59, Emacs is not transliterated to cyrillic anymore; fixes; by Ognyan Kulev <ogi@fmi.uni-sofia.bg>, TUTORIAL.sv: Sync some other changes with the TUTORIAL version 1.61 in CVS by Mats Lidell <matsl@contactor.se>. Corrected admin/ChangeLog entry. Updated admin/FOR-RELEASE.
Marcelo Toledo <marcelo@gnu.org>
parents: 61143
diff changeset
1 Emacs 快速指南(.
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
2 Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
3
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
4 Emacs 指令通常包含有 CONTROL 鍵(有時候以 CTRL 或 CTL 來標示)或是
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
5 META 鍵(有時候以 EDIT 或 ALT 來標示)。為了避免每一次都要寫出其全名,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
6 我們將會使用下述的縮寫:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
7
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
8 C-<chr> 表示當鍵入字元 <chr> 時 按住 CONTROL 鍵。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
9 因此,C-f 就是:按住 CONTROL 鍵再鍵入 f 。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
10 M-<chr> 表示當鍵入字元 <chr> 時 按住 META 或 EDIT 或 ALT 鍵。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
11 如果沒有 META 、 EDIT 或 ALT 鍵時,則可以用
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
12 「按一下 ESC 鍵然後放開,再鍵入 <chr> 的步驟」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
13 來作為替代。我們以 <ESC> 來表示 ESC 鍵。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
14
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
15 重要備忘錄:要離開 Emacs 作業階段( session ),鍵入 C-x C-c (兩個字
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
16 元)。位在左側邊界的「>>」字元是讓您可以試著使用的指令的提示。舉例來說:
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
17 <<Blank lines inserted around following line by help-with-tutorial>>
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
18 [Middle of page left blank for didactic purposes. Text continues below]
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
19 >> 現在鍵入 C-v ( View next screen )以移到下個螢幕。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
20 (試試看,鍵入字元 v 時,按住 CONTROL 鍵)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
21 從現在開始,您應該在每次閱讀完目前的螢幕時做一次這個動作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
22
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
23 要注意的是,當您從一個螢幕移到另一個時,中間會有兩行重複;這樣做是為了
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
24 提供一些連續性,讓您可以接續地閱讀文字。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
25
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
26 您需要知道的第一件事是如何在文字中移動。您已經知道了可以 C-v 來向前移
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
27 動一個螢幕。要向後移動一個螢幕,則鍵入 M-v (按住 META 鍵,然後鍵入 v
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
28 ,或是如果您沒有 META 、 EDIT 或 ALT 鍵時鍵入 <ESC>v )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
29
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
30 >> 試著鍵入 M-v 然後 C-v ,連續個幾次。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
31
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
32 【現在您可以 C-v 指令移到後面「翻譯」一節,以取得關於本文的翻譯相關事
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
33 項;然後以 M-v 指令回到這裡。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
34
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
35
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
36 * 摘要( SUMMARY )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
37 -------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
38
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
39 以下的指令在檢閱螢幕時相當有用:【我們現在以「螢幕」來表示「顯示檔案內
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
40 容的區域」,因為目前是處在 Emacs 中的單窗格( window )顯示狀態,如果
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
41 是在多窗格的狀態下,這裡所介紹的指令則作用在「工作中的窗格」。有關於窗
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
42 格的介紹,請見窗格( windows )一節。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
43
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
44 C-v 向前移動一個螢幕/窗格
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
45 M-v 向後移動一個螢幕/窗格
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
46 C-l 清除螢幕/窗格,再重新顯示所有文字,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
47 游標所在位置會顯示於螢幕/窗格的中央。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
48 (是 CONTROL-L 而不是 CONTROL-1 )
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
49
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
50 >> 找出游標的位置,並注意其附近的文字為何。然後鍵入 C-l 。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
51 再次找出游標的位置,確認一下相同的文字現在也位在其附近。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
52
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
53 如果您的終端機有 PageUp 與 PageDn 鍵的話,您也可以使用它們來以螢幕為單
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
54 位地移動,但是使用 C-v 和 M-v 會比較有效率。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
55
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
56
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
57 * 基本的游標控制( BASIC CURSOR CONTROL )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
58 ------------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
59
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
60 螢幕到螢幕的移動是很有用,但是您如何移動到位於螢幕內文字中的特定位置呢?
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
61
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
62 有幾種方式可以進行。您可以使用方向鍵,但是將您的手放在標準的〔鍵盤〕位
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
63 置,並且使用指令 C-p 、 C-b 、 C-f 和 C-n 將比較有效率。這些字元和四個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
64 方向鍵〔的功能〕是同等的,如下所示:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
65
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
66 前一行 C-p
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
67 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
68 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
69 向後移 C-b .... 目前游標位置 .... 向前移 C-f
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
70 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
71 :
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
72 後一行 C-n
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
73
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
74 >> 以 C-n 或 C-p 將游標移到圖形的中央。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
75 鍵入 C-l 會看到整個圖形顯示在螢幕的中央。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
76
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
77 您會發現用字母所代表的意義來記憶它們很容易:P 表示 previous 、 N 表示
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
78 next 、 B 表示 backward 、而 F 則表示 forward 。您將「總是」用到這些游
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
79 標移動指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
80
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
81 >> 按幾次 C-n 把游標往下移動到這行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
82
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
83 >> 按幾次 C-f 往前移到這行,然後再以 C-p 往後移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
84 看看當游標在本行中央時,C-p 的動作是怎樣。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
85
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
86 每一個文字行都以一個 Newline 字元作為結束,它是用來與下一行作為分別。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
87 在您檔案中的最後一行應該要有一個 Newline 來作為結束(但是 Emacs 並不一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
88 定需要它來編輯檔案)。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
89
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
90 >> 試著在一行開始的地方鍵入 C-b 。結果應該會移動到前一行的最後面。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
91 這是因為它往後移動時越過了 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
92
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
93 C-f 也可以和 C-b 一樣地越過 Newline 字元。【Newline 字元是「不可見
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
94 ( invisible )字元」,在編輯器中一般看不到它,這裡只是告訴您:在行首
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
95 再往前走,那麼游標會跑到前一行(如果有前一行的話);在行尾再往後走,那
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
96 麼游標會跑到後一行(如果有後一行的話)。「越過 Newline 字元」會讓游標
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
97 跑到另外一行。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
98
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
99 >> 多按幾次 C-b,自己感覺一下游標在哪。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
100 然後按幾次 C-f 回到這行的尾巴。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
101 再按一次 C-f 就可以移到下一行了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
102
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
103 當您移動游標穿越螢幕的上方或下方時,在邊界外的文字會移位進入螢幕內。這
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
104 稱為「捲動」。它讓 Emacs 可以將游標移動到文字中的任意特定位置,同時
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
105 (游標)不會跑出螢幕外。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
106
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
107 >> 試著以 C-n 將游標越過螢幕下方,然後看看發生了什麼事。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
108
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
109 如果一個字元一個字元地移動太慢的話,您可以一個字一個字地移動。M-f
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
110 (META-f) 往前移動一個字,M-b 則往後移動一個字。【對中文來說,則是移動
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
111 到下一個或下一個標點符號的所在。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
112
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
113 >> 鍵入一些 M-f 和 M-b。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
114
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
115 當您在一個字的中間時,M-f 會移動到這個字的尾巴。當您在字與字間的空白時,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
116 M-f 會移動到下一個字的尾巴。M-b 的效果相似,只是方向不同。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
117
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
118 >> 按幾次 M-f 和 M-b,中間夾雜一些 C-f 和 C-b,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
119 這樣子您就可以觀察 M-f 和 M-b 在各種「位在字間或字元間」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
120 的不同位置,所表現出來的行為。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
121
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
122 請注意 C-f 、 C-b 和 M-f 、 M-b 兩對之間的相似性。「經常」的狀況是:
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
123 META 字元是用來作為與「以語言定義出的單位(字、句子、段落)」有關的操
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
124 作,而 CONTROL 字元則是作用在「與您所編輯無關的『基本』單位(字元或行
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
125 等)」上。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
126
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
127 這個相似性在「行與句子」之間也同樣適用:C-a 和 C-e 會將游標移動到「一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
128 行」的 開始和結尾處,而M-a 和 M-e 則將游標移動到「一句」的 開始和結尾
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
129 處。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
130
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
131 >> 試著按兩次 C-a,再按兩次 C-e。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
132 試著按兩次 M-a,再按兩次 M-e。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
133
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
134 看一下為什麼重複的 C-a 指令會沒有作用,而重複的 M-a 指令則繼續移動到下
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
135 一個句子。雖然這並不能說是完全類比,但是其中每個指令的行為看起來都十分
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
136 自然。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
137
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
138 游標在文字中的位置也可以稱作「點位( point )」。簡單來說就是:游標表
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
139 現出螢幕中「點位」所在的文字位置。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
140
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
141 這裡是一些簡單「游標移動( cursor-moving )操作」的整理,其中也包括了
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
142 「字和句」的移動指令:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
143
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
144 C-f 往前移動一個字元
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
145 C-b 往回移動一個字元
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
146
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
147 M-f 往前移動一個字【中文是移動到下一個標點符號】
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
148 M-b 往回移動一個字【中文是移動到上一個標點符號】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
149
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
150 C-n 移動到下一行
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
151 C-p 移動到上一行
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
152
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
153 C-a 移動到行首
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
154 C-e 移動到行尾
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
155
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
156 M-a 移回句首
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
157 M-e 移到句尾
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
158
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
159 >> 練習幾次這些指令。這些都是最常使用到的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
160
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
161 還有兩個重要的游標動作( cursor-motion )指令,M-<( META Less-than ),
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
162 移動到文字的最開始,以及M->( META Greater-than ),移動到文字的最後。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
163
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
164 在大部份的終端機,「<」是在 comma 上方,所以您必須要使用 shift 鍵來鍵
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
165 入。在這些終端機上,您必須使用 shift 鍵來鍵入 M-<;沒有使用 shift 鍵,
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
166 您就變成鍵入 M-comma 了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
167
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
168 >> 現在試一下 M-< ,移到本快速指南的最開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
169 然後再重複地使用 C-v 回到這裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
170
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
171 >> 現在試一下 M-> ,移到本快速指南的最後。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
172 然後再重複地使用 M-v 回到這裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
173
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
174 如果您的終端機有方向鍵的話,您也可以用方向鍵移動游標。我們有三個理由建
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
175 議您學習 C-b 、 C-f 、 C-n 、 和 C-p :(1) 任何的終端機都能使用。(2)
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
176 一旦您使用 Emacs 相當熟練了,您會發現鍵入這些 CONTROL 字元,比起使用方
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
177 向鍵快多了(因為您不需要將手移開打字區)。(3) 一旦您使用這些 CONTROL
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
178 字元指令成為習慣,您也可以很容易地學會其他進階的游標動作指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
179
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
180 大部份的 Emacs 指令接受數字參數;對大部份的指令而言,它的作用是指定重
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
181 複次數。您要指定一個指令的重複次數的作法是:先鍵入 C-u,然後在您鍵入指
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
182 令前,鍵入代表重複次數的數位。如果您有一個 META(或 EDIT 或 ALT )鍵,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
183 那麼您還有另外一個替代作法來輸入數字參數:按住 META 鍵時打入這數字。我
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
184 們建議您學習 C-u 的方法,因為它在任何終端機都可以使用。此一數字參數也
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
185 稱作為「字首參數」,因為您在這參數所作用到的指令前鍵入它。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
186
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
187 舉例來說, C-u 8 C-f 向前移動 8 個字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
188
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
189 >> 試著以一個數字參數來使用 C-n 或 C-p,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
190 只一個指令就將游標移動到這行的附近。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
191
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
192 大部份的指令使用數字參數來作為其重複次數,但是其中有些指令則是作為其他
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
193 用途。有幾個指令(目前您尚未學到)將它作為旗標 -- 以一個字首參數的型態
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
194 出現,而不管其值為何,它們讓這指令做些不一樣的事。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
195
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
196 C-v 和 M-v 則是另一類的例外。當給定一個參數時,它們捲動「所指定的數量
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
197 的行(以行為單位)」,而不是以「螢幕」為單位捲動。舉例來說,C-u 8 C-v
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
198 將顯示螢幕捲動 8 行。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
199
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
200 >> 現在試著鍵入 C-u 8 C-v。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
201
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
202 這指令應該已經將螢幕向上移了 8 行。若您想將它再次地向下捲動,您可以在
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
203 執行 M-v 時給定一個參數。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
204
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
205 如果您正在使用 X 視窗系統,在 Emacs 視窗左手側應該有一個稱為「捲動軸」
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
206 的長方型區域。您可以用滑鼠在捲動軸按一下來捲動文字。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
207
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
208 >> 試著在「捲動軸內反白區域上」壓一下中間鈕。這應該會將文字捲動到
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
209 「由您所按一下滑鼠的地方」所決定的位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
210
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
211 >> 當按住中間時,試著將滑鼠上下移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
212 您會看到文字隨著您移動滑鼠而上下移動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
213
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
214
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
215 * 當 EMACS 發呆時( WHEN EMACS IS HUNG )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
216 -----------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
217
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
218 如果 Emacs 停止回應您的指令,您可以鍵入 C-g 來安全地停止它。您也可以使
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
219 用 C-g 來停止執行過久的指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
220
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
221 您也可以使用 C-g 來取消數字參數或您不想要完成的指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
222
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
223 >> 鍵入 C-u 100 以設定一個 100 的數字參數,然後鍵入 C-g。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
224 現在鍵入 C-f。它應該只會移動一個字元,因為您已經以 C-g
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
225 取消了參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
226
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
227 如果您已經不小心地鍵入一個 <ESC>,您可以 C-g 來取消它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
228
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
229
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
230 * 無效化的指令( DISABLED COMMANDS )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
231 -------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
232
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
233 有一些 Emacs 指令被「無效化」了,因此初學者不會意外地使用到它們。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
234
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
235 如果您鍵入了某一個無效化的指令,Emacs 會顯示一個訊息,說明這個指令是什
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
236 麼,並且詢問您是否想要繼續,然後執行這指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
237
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
238 如果您真的想要試一下這個指令,那麼在當 Emacs 詢問您時,請鍵入空白。一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
239 般來說,如果您不想要執行這個無效化的指令,請以『n』來回答它。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
240
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
241 >> 鍵入 C-x C-l (這是個無效化的指令)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
242 然後鍵入 n 來回答問題。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
243
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
244
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
245 * 窗格( WINDOWS )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
246 -------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
247
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
248 Emacs 可以有數個窗格,每一個顯示它自己的文字。我們在稍後會解釋如何使用
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
249 多重窗格。現在我們想要解釋如何除去多餘的窗格,然後回到基本的單窗格編輯。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
250 它很簡單:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
251
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
252 C-x 1 One window (即,除去其他所有的窗格)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
253
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
254 那是個 CONTROL-x 後面跟著數字 1 。C-x 1 將含有游標的窗格擴大到整個螢幕。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
255 它將所有其他的窗格除去。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
256
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
257 >> 移動游標到本行並且鍵入 C-u 0 C-l。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
258 >> 鍵入 CONTROL-h k CONTROL-f。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
259 看看這個窗格在當一個新的窗格出現
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
260 (以顯示有關 CONTROL-f 指令的文件時),它是如何縮小的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
261
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
262 >> 鍵入 C-x 1 以使文件列表窗格消失。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
263
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
264 這個指令並不像您先前所學過的指令那般,它包括了兩個字元。它是以字元
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
265 CONTROL-x 作為開始。有一整個系列的指令是以 CONTROL-x 作為開始;它們之
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
266 中有許多是與「窗格、檔案、暫存區以及相關事物」有關的。這些指令有 2 、
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
267 3 或 4 個字元長。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
268
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
269
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
270 * 插入與刪除( INSERTING AND DELETING )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
271 ----------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
272
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
273 如果您想要插入文字,把它鍵入就是了。您可以看到的字元,像是 A 、 7 、 *
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
274 等,被 Emacs 視為文字並且可以直接插入。鍵入 <Return>
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
275 ( carriage-return 鍵)以插入一個 Newline 字元。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
276
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
277 您可以鍵入 <Delback> 以刪除您最後鍵入的字元。<Delback> 是一個的鍵盤鍵
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
278 -- 就是您通常在 Emacs 外,使用來「刪除您最後鍵入字元」的同一個。一般來
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
279 說是個在 <Return> 上方數行的大鍵,通常標示為『Delete』、『Del』或
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
280 『Backspace』。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
281
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
282 如果在那裡有個標示為『Backspace』的大鍵,那麼那一個就是您使用來作為
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
283 <Delback> 的鍵了。某個地方可能也會有另一個標示為『Delete』的鍵,但那個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
284 並不是 <Delback> 。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
285
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
286 更一般地說, <Delback> 將位於目前游標位置前一個字元加以刪除。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
287
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
288 >> 現在做 -- 鍵入一些字元,然後鍵入幾次 <Delback> 來刪除它們。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
289 不要擔心這個檔案會被更動;您不會影響到原來的快速指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
290 (您現在看到的)這一個是您的個人拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
291
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
292 當一行文字變得比「在窗格中的一行」長時,這一行文字會「接續」到第二行窗
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
293 格行。這時一個反斜線「\」(或如果您使用視窗化的顯示,則是一個小小彎彎
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
294 的箭頭)會位在其右邊界以指出此行接續著。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
295
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
296 >> 插入文字,一直到您達到右邊界,然後再繼續插入。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
297 您會看到一個接續行出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
298
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
299 >> 使用 <Delback> 刪除一些文字,直到此行再次成為一個窗格行。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
300 接續行消失了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
301
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
302 您可以像刪除其他字元一樣地刪除 Newline 字元。將位在兩行中的 Newline 字
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
303 元刪除會讓它們合併成為一行。如果合併的結果使這一行太長,以致無法符合窗
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
304 格的寬度,它會以一個接續行來顯示。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
305
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
306 >> 移動游標到本行的開頭並鍵入 <Delback>。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
307 這會將本行與其前一行結合為一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
308
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
309 >> 鍵入 <Return> 以重新插入您剛才刪除的 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
310
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
311 記得大部份的 Emacs 指令都可以給予一個重複計數( repeat count );這也
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
312 包括了文字字元。重複一個文字字元會將它插入數次。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
313
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
314 >> 現在就試一下 -- 鍵入 C-u 8 * 以插入 ********。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
315
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
316 您現在已經學到了「鍵入個什麼東西進 Emacs 以及修正錯誤」的大部份基本方
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
317 法。您也可以「以字或行為單位」地刪除。這裡有份關於「刪除操作」的摘要:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
318
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
319 <Delback> 刪除游標所在的 前一個字元
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
320 C-d 刪除游標所在的 後一個字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
321
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
322 M-<Delback> 刪除游標所在的 前一個字
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
323 M-d 刪除游標所在的 後一個字
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
324
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
325 C-k 刪除從游標所在到「行尾」間的字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
326 M-k 刪除從游標所在到「句尾」間的字元
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
327
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
328 注意「<Delback> 和 C-d」還有「M-<Delback> 和 M-d」是平行地自 C-f 和
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
329 M-f 擴充出來的(嗯,<Delback> 並不是控制字元,但是沒什麼好擔心的)。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
330 C-k 和 M-k 在某種程度上與 C-e 和 M-e 一樣,如果把「一行」和「一句」作
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
331 為類比的話。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
332
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
333 您也可以只以一種方法來刪除緩衝區內的任何部份,先移動到您想要刪除的部份
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
334 的一端,然後鍵入 C-@ 或 C-SPC (任一個即可)。( SPC 指的是 Space Bar
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
335 )再移到那部份的另一端,接著鍵入 C-w 。這樣就會把介於這兩個位置間的所
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
336 有文字刪除。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
337
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
338 >> 移動游標到上一段開頭的「您」字。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
339 >> 鍵入 C-SPC 。 Emacs 應該會在螢幕的下方顯示一個「Mark set」訊息。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
340 >> 移動游標到第二行中的「端」字。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
341 >> 鍵入 C-w 。這樣會把從「您」開始到剛好「端」之前的文字刪除。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
342
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
343 要注意的是「殺掉( killing )」和「刪除( deleting )」的不同在於被殺
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
344 掉的可以拉回,而被刪除的則不能。【有點難以理解,您可以這麼想:(1)「被
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
345 殺掉的」尚存尸骨,而「被刪除的」則尸骨無存了!可見得對電腦資料來說,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
346 「刪除」比「殺掉」嚴重多了。(2)實際上,就算被刪除了,我們還是有技術可
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
347 以把它救回來,尤其是文字資料,前提是刪除後不能進行實體記憶體的格式化動
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
348 作。但這對於一般使用者而言是不可能的,因此就不考慮這情形了。】重新插入
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
349 被殺掉的文字稱為「拉回( yanking )」。一般而言,可以移除掉很多文字的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
350 指令會把那些文字儲存起來(它們設定成您可以將文字拉回),而那些只是刪除
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
351 一個字元或者只是除去空白行或空白的指令,則不會儲存這些被刪除的文字(因
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
352 此您不能將那文字拉回)。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
353
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
354 >> 移動游標到一非空白行的開始。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
355 然後鍵入 C-k 殺掉在那一行上的文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
356 >> 第二次鍵入 C-k。您將會看到它殺掉跟在那一行後面的 Newline 字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
357
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
358 請注意單獨的 C-k 會把一行的內容殺掉,而第二個 C-k 則會殺掉那一行本身,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
359 並且使得所有其他的行向上移動。C-k 以很特別的方式來處理數字參數,它會殺
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
360 掉很多行以及它們的內容,這不僅僅是重複而已,C-u 2 C-k 會把兩行以及它們
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
361 的 Newline 字元殺掉;如果只是鍵入 C-k 兩次並不會這樣。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
362
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
363 將被殺掉的文字回復的動作稱為「拉回( yanking )」。(把它想像成您把別
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
364 人從您身上奪去的東西猛力地拉回來)您可以在您刪除文字的地方拉回,也可以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
365 在文字的其他地方拉回。您可以拉回數次同樣的文字,以製作它的數份拷貝。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
366
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
367 拉回的指令為 C-y。它會在目前游標的位置重新插入最後殺掉的文字。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
368
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
369 >> 試試看;鍵入 C-y 將文字拉回。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
370
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
371 如果您連續地做了數次 C-k,所有被殺掉的文字都會被儲存在一起,因此做一次
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
372 C-y 就會把所有這些行都拉回來。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
373
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
374 >> 現在做一下,鍵入 C-k 數次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
375
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
376 現在要回復那些殺掉的文字:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
377
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
378 >> 鍵入 C-y。然後把游標往下移動個幾行,再一次鍵入 C-y。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
379 您現在知道如何複製某些文字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
380
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
381 如果您有一些文字想要拉回來,但是後來您又殺了某些東西,那麼該怎麼做呢?
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
382 C-y 會把最近殺掉的拉回來,但是先前的文字並沒有消失,您可以用 M-y 來回
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
383 到它。當您已經使用 C-y 把最近殺掉的拉回來之後,再鍵入 M-y 來把這些拉回
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
384 來的文字替換為先前所殺掉的。一次又一次地鍵入 M-y 會把先前再先前所殺掉
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
385 的文字帶回來。當您到了您想找的文字時,您不需要做任何事來保存它,只要繼
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
386 續您的編輯,把這些已拉回的文字留在那裡就好。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
387
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
388 如果您 M-y 做了很多次,您可能會回到起始點,也就是最近殺掉的。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
389
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
390 >> 殺掉一行,到處繞繞,再殺掉另一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
391 然後用 C-y 將第二次殺掉的那行帶回來。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
392 然後再用 M-y,它將會被第一次殺掉的那行取代。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
393 再做幾次 M-y 看看您會得到什麼。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
394 不間斷地做,直到第二個殺掉行回來,再做個幾次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
395 如果您想的話,您可以試著給 M-y 正的或是負的參數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
396
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
397
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
398 * 取消動作( UNDO )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
399 --------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
400
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
401 如果您對文字做了一些改變,後來覺得它是個錯誤,您可以 Undo 指令取消這一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
402 個改變,C-x u。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
403
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
404 通常 C-x u 會把一個指令所造成的改變取消掉;如果您在一行中重複了許多次
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
405 C-x u,每一個重複都會取消額外的指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
406
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
407 但是有兩個例外:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
408 (1) 沒有改變文字的指令不算(這包括了游標移動的指令還有捲軸指令);
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
409 (2) 自行鍵入的字元以一群一群 -- 每群最多 20 個 -- 來進行處理。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
410 (這是為了減少您在取消「插入文字動作」所必須鍵入 C-x u 的次數)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
411
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
412 >> 以 C-k 將這一行殺掉,然後鍵入 C-x u 後它會再次出現。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
413
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
414 C-_ 是另一個取消指令;它的作用就和 C-x u 一樣,但是在一行中它比較容易
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
415 鍵入許多次。C-_ 的缺點是在某些鍵盤中不太清楚如何鍵入它,這也是為什麼我
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
416 們同時提供 C-x u 的原因。在某些終端機,您可以按住 CONTROL 再鍵入 / ,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
417 來鍵入 C-_。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
418
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
419 一個數字參數對 C-_ or C-x u 來說,是作為重複的次數。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
420
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
421
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
422 * 檔案( FILE )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
423 ----------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
424
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
425 為了使您編輯的文字永久保存,您必須把它放到一個檔案中。不然,當您離開
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
426 Emacs 後,它就會隨之消失。為了把您的文字放在檔案中,您必須在您鍵入這些
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
427 文字前「找( find )」檔案。(這也稱之為「拜訪( visiting )」檔案)
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
428
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
429 找一個檔案表示您可以在 Emacs 中看到檔案的內容。從許多方面來看,它就像
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
430 是您直接編輯那個檔案一樣。然而,直到您「儲存」這個檔案之前,您使用
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
431 Emacs 編輯所做出的改變並不會保存下來。這就是為什麼當您不想要時,您可以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
432 避免留下修改到一半的檔案在系統中。即使當您儲存了,Emacs 也會把原本的檔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
433 案以一個不同的名稱保留下來,若您稍後覺得您的改變是一個錯誤的話,就可以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
434 使用它。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
435
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
436 在靠近螢幕的下方,您可以看到由破折號開始與結束的一行 -- 通常是以「--:--
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
437 TUTORIAL.zh」或其他類似的東西作為開始。這是螢幕的一部分,通常用來表示
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
438 您正在拜訪的檔案。現在,您正在拜訪的檔案叫做「TUTORIAL.zh」,它是您個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
439 人的拷貝。當您以 Emacs 找出一個檔案時,那個檔案的名字就會出現在那個地
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
440 方。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
441
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
442 關於尋找檔案的指令中,有一個很特別的是,您必須說出這個您想要的檔案名稱。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
443 我們說這個指令「從終端機中讀進了一個參數」。(在這個例子中,這參數就是
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
444 檔案的名稱)當您鍵入這個指令後,
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
445
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
446 C-x C-f 找一個檔案
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
447
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
448 Emacs 會要您鍵入檔名。您所鍵入的檔名會出現在螢幕的底行。在被用來作為這
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
449 種形式的輸入時,底行被稱為小緩衝區( minibuffer )。您可以使用正常的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
450 Emacs 編輯指令來編輯這個檔名。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
451
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
452 當您正在鍵入檔名時(或是任何的小緩衝區輸入時),您可以用 C-g 這個指令
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
453 來取消它。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
454
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
455 >> 鍵入 C-x C-f,然後鍵入 C-g。這會取消小緩衝區,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
456 並且也會取消使用這個小緩衝區的 C-x C-f 指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
457 因此您沒有找任何檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
458
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
459 當您已經鍵入了這個檔名,請鍵入 <Return> 來結束它。然後 C-x C-f 指令就
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
460 會開始運作,並且找到您所選擇的檔案。小緩衝區在當 C-x C-f 指令結束時就
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
461 會消失。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
462
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
463 過了一會兒,檔案的內容就會出現在螢幕,然後您就可以編輯它的內容。當您想
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
464 要您的改變永久保存時,鍵入這個指令:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
465
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
466 C-x C-s 儲存這個檔案
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
467
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
468 這會把在 Emacs 中的文字複製到檔案中。當您第一次做這個動作時,Emacs 會
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
469 將原始的檔案重新命名成一個新的名字,這樣它才不會消失。新的名字通常會加
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
470 入「~」到原始檔案的名字後面。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
471
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
472 當儲存結束時,Emacs 會把寫入檔案的名字列出來。您應該經常地進行儲存,這
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
473 樣子如果系統當機時,您就不會損失太多工作。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
474
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
475 >> 鍵入 C-x C-s 以儲存本快速指南的您的拷貝。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
476 這會把「Wrote ...TUTORIAL.zh」這個訊息顯示在螢幕的下方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
477
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
478 注意:在某些系統中,鍵入 C-x C-s 將會把螢幕凍結,您將看不到從 Emacs 來
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
479 的任何輸出。這表示作業系統一個稱為「流程控制」的「功能」將 C-s 指令攔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
480 截住,並且不讓它傳到 Emacs。要取消螢幕的凍結,請鍵入 C-q。然後到 Emacs
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
481 使用手冊中看看對於「漸進式搜尋的同時進入( Spontaneous Entry to
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
482 Incremental Search )」這個主題,以取得處理這個「功能」的建議。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
483
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
484 您可以找出一個已經存在的檔案,然後觀看它或編輯它。您也可以找一個還沒有
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
485 存在過的檔案。這是以 Emacs 建立一個檔案的方法:找這個檔案,就從零開始,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
486 然後開始插入文字到這個檔案中。當您要求「儲存」這個檔案,Emacs 會真的建
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
487 立一個檔案,並把您所插入的文字擺到檔案中。從那時候開始,您就可以當自己
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
488 是在編輯一個已經存在的檔案了。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
489
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
490
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
491 * 緩衝區( BUFFER )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
492 --------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
493
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
494 如果您以 C-x C-f「找」第二個檔案,第一個檔案仍然存在 Emacs 內。要切換
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
495 回它,您可以 C-x C-f 再找它一次。依此方式,您可以在 Emacs 內開啟不少檔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
496 案。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
497
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
498 >> 以鍵入 C-x C-f foo <Return> 的方式建立一個名為「foo」的檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
499 然後插入一些文字,編輯它,然後再以 C-x C-s 儲存「foo」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
500 最後,鍵入 C-x C-f TUTORIAL.zh <Return> 回到本快速指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
501
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
502 Emacs 儲存每個檔案的文字在一個稱為「緩衝區( buffer )」的物件中。找一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
503 個檔案會在 Emacs 內部建立一個緩衝區。想要看目前存在您的 Emacs 的工作中
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
504 緩衝區列表,鍵入
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
505
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
506 C-x C-b 列出緩衝區
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
507
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
508 >> 現在就試一下 C-x C-b
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
509
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
510 看看每一個緩衝區是如何命名的,它也可能同時擁有一個「儲存其內容的檔案」
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
511 的名稱。您在一個 Emacs 窗格所見到的「任何」文字都是某個緩衝區的一部份。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
512
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
513 >> 鍵入 C-x 1 以離開緩衝列表
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
514
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
515 當您有數個緩衝區時,在任何時候其中只有一個是「目前作用的」。而那個就是
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
516 您在編輯的緩衝區。如果您想要編輯另一個緩衝區,那麼您必須「切換」到它。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
517 如果您想要切換到連接到某個檔案的緩衝區,您可以用 C-x C-f 再次拜訪那個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
518 檔案。但是有個比較簡單的方式:使用 C-x b ;在這個指令中,您必須鍵入緩
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
519 衝區的名稱。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
520
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
521 >> 鍵入 C-x b foo <Return> 以回到含有檔案「foo」的文字的緩衝區。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
522 然後建入 C-x b TUTORIAL <Return> 以回到本快速指南。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
523
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
524 就大部份的情況來說,緩衝區的名稱與檔案的名稱是相同的(除去了檔名中的目
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
525 錄部份)。然而並不總是如此。您以 C-x C-b 所製作出的緩衝區列表總是會顯
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
526 示給您每一個緩衝區的名稱。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
527
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
528 您在一個 Emacs 窗格中所見到的「任何」文字總是某個緩衝區的一部份。有一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
529 些緩衝區並沒有連接到檔案。舉例來說,命名為「*Buffer List*」的緩衝區並
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
530 沒有任何檔案。它是包含有您以 C-x C-b 指令所製作出來的緩衝區列表的緩衝
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
531 區。命名為「*Messages*」的緩衝區也沒有連接到任何檔案;它在您的 Emacs
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
532 作業階段中包含出現在底行的訊息。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
533
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
534 >> 鍵入 C-x b *Messages* <Return> 來看看訊息的緩衝區。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
535 然後鍵入 C-x b TUTORIAL <Return> 回到本快速指南。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
536
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
537 如果您對檔案中的文字做了修改,然後找另一檔案,這個動作並不會儲存第一個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
538 檔案。它的修改仍舊存在 Emacs 中,也就是在那個檔案的緩衝區中。對於第二
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
539 個檔案的建立或編輯並不會影響到第一個檔案的緩衝區。這樣子非常有用,但這
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
540 個情形也表明了您需要「一個方便的方法」來儲存第一個檔案的緩衝區。只是為
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
541 儲存第一個檔案就必須以 C-x C-f 切換緩衝區,才能以 C-x C-s 將它儲存,總
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
542 是個讓人討厭的過程。因此我們有
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
543
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
544 C-x s 儲存一些緩衝區
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
545
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
546 C-x s 會詢問您關於您已做出修改但還沒儲存的每一個緩衝區。它會問您,對於
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
547 每一個這樣的緩衝區,是否要儲存?
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
548
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
549 >> 插入一行文字,然後鍵入 C-x s。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
550 它應該會問您是否要儲存名為 TUTORIAL.zh 的緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
551 鍵入『y』以回答要儲存。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
552
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
553
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
554 * 擴充指令集( EXTENDING THE COMMAND SET )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
555 -------------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
556
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
557 由於 Emacs 擁有太多指令,即便使用上所有的 CONTROL 和 META 字元,也沒辦
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
558 法完全擺上。Emacs 以 X(擴充『eXtend』)指令來解決這個問題。擴充指令有
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
559 兩種型式:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
560
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
561 C-x 字元擴充。後面跟著一個字元。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
562 M-x 有名稱的指令擴充。後面跟著一個長的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
563
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
564 還有一些指令通常來說是很有用的,但是比您已經學到的指令較少使用。您已經
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
565 看過其中兩個:檔案指令中的 C-x C-f 去尋找,以及 C-x C-s 去儲存。其他的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
566 例子則有結束 Emacs 階段的指令 -- 這個指令是 C-x C-c。(不要擔心您會失
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
567 去已經做出的改變,C-x C-c 在它殺掉 Emacs 之前會提供儲存每一個變動的檔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
568 案的機會。)
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
569
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
570 C-z 是 *暫時* 離開 Emacs 的指令 -- 因此您稍後可以回到同樣的 Emacs 階段。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
571
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
572 在某些允許它的作用的系統中, C-z 會「暫停住( suspends )」Emacs,也就
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
573 是說,它會回到 shell 但不會把 Emacs 毀掉。在最常用的 shell 中,您可以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
574 用『fg』或『%emacs』兩種指令恢復 Emacs。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
575
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
576 在沒有提供暫停功能的系統中,C-z 會在 Emacs 底下建立一個 subshell 以讓
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
577 您有機會執行其他的程式,並且在稍後回到 Emacs,它並沒有真的離開 Emacs。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
578 在這個例子中,shell 指令『exit』是從subshell 回到 Emacs 的通常方式。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
579
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
580 使用 C-x C-c 的時機是當您打算要登出時。它也非常適合用來離開被其他郵件
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
581 處理程式,以及許多不同的應用程式所啟動的 Emacs。然而在一般的狀況下,如
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
582 果您不打算登出,最好是把 Emacs 暫停而不是離開它。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
583
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
584 有許多 C-x 的指令。這裡是一份您已經學過的列表:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
585
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
586 C-x C-f 找檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
587 C-x C-s 儲存檔案。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
588 C-x C-b 列出緩衝區。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
589 C-x C-c 離開 Emacs。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
590 C-x 1 除了一個外,刪去其他所有的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
591 C-x u 取消動作。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
592
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
593 以擴充來命名的指令通常是不太常使用的指令,或是只在特定的模式下才會使用
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
594 的指令。一個例子是取代字串指令,它會全域地將一個字串以另一個來取代。當
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
595 您鍵入 M-x 時,Emacs 會在螢幕的底端詢問您,然後您也應該鍵入這個指令的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
596 名稱。在這個例子中是『replace-string』只要鍵入『repl s<TAB>』,然後
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
597 Emacs 將會補齊這個名稱。以 <Return> 來結束這個指令名稱。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
598
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
599 取代字串指令需要兩個參數 -- 被取代的字串以及用來取代它的字串。您必須以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
600 Newline 字元來結束每一個參數。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
601
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
602 >> 將游標移到本行的下兩行空白,然後鍵入
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
603 M-x repl s<Return>changed<Return>altered<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
604
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
605 【為了說明的目的,於下保留一行原文。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
606 Notice how this line has changed: you've replaced... 】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
607
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
608 請注意這一行是怎麼改變的:在游標的起始位置之後,您已經將 c-h-a-n-g-e-d
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
609 這個字 -- 不管它在哪裡出現 -- 以「altered」這個字來取代了。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
610
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
611
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
612 * 自動存檔( AUTO SAVE )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
613 -------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
614
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
615 當您在一個檔案中做了修改,但是還沒有將它們儲存起來,那麼如果您的電腦當
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
616 機,它們將有可能遺失。為了避免這種情形發生在您的身上,Emacs 會定期地將
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
617 您正在編輯的檔案寫入「自動儲存」檔案中。自動儲存檔案在檔名的前後會各有
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
618 一個 # 符號;舉例來說,如果您的檔案名為「hello.c」,那麼它的自動儲存檔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
619 案的檔名就是「#hello.c#」。當您以平常的方式儲存檔案時,Emacs 就會把它
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
620 的自動儲存檔刪除。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
621
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
622 如果當機,您可以經由正常地尋找檔案,(指的是您在編輯的檔案而不是自動儲
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
623 存檔)然後鍵入 M-x recover file<Return> 來回復您的自動儲存檔。當它要求
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
624 確認時,鍵入 yes<Return> 以繼續並回復自動儲存的資料。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
625
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
626
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
627 * 回應區( ECHO AREA )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
628 -----------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
629
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
630 如果 Emacs 見到您很慢地鍵入多字元指令,它會將它們顯示在位於窗格下方,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
631 稱為「回應區」的區域給您參閱。回應區位在窗格的最後一行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
632
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
633
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
634 * 狀態行( MODE LINE )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
635 -----------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
636
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
637 位在回應區的正上面是稱為「狀態行」的一行。狀態行顯示出一些資訊,如:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
638
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
639 --:** TUTORIAL.zh (Fundamental)--L670--58%----------------
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
640
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
641 本行提供一些關於「Emacs 的狀態」以及「您正在編輯的文字」的有用資訊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
642
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
643 您已經知道檔名的意義是什麼了 -- 就是您找的檔案。-NN%-- 指出目前您在文
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
644 字檔中的位置;它的意思是說:有 NN 百分比的文字位在窗格的上面。如果檔案
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
645 的頂端就位在窗格中,那麼它就會顯示 --Top-- 而不是 --00%--。如果檔案的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
646 底部就位在窗格中,那麼它是顯示 --Bot--。如果您正在看的文字檔很小,在窗
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
647 格中就足以看到全部的內容,那麼狀態行就會顯示 --All--。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
648
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
649 L 和數字以另一種方式來表示出位置:它們給出了目前所在的行數( Line )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
650
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
651 在靠近前面的星號表示您已經對這些文字做了改變。在您剛拜訪或儲存一個檔案
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
652 之後,狀態行的那個部分會沒有星號,只有破折號。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
653
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
654 狀態行中位於小括弧裡面的部分,是用來告訴您正在使用什麼編輯模式。預設的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
655 模式是 Fundamental,也就是您現在使用的。它是「主模式」的一個例子。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
656
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
657 Emacs 有許多不同的主模式。它們之中有一些是用來編輯不同的語言以及/或不
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
658 同種類的文字,像是 Lisp 模式、 Text 模式等等。在任何的時間只有一個主模
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
659 式可以作用,並且它的名稱總可以在狀態行中被找到,就在現在的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
660 「Fundamental」中的位置。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
661
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
662 每一個主模式都使得一些指令的行為表現得不太一樣。舉例來說,在一個程式中
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
663 有一些指令用來製作出註解,而由於每一種程式語言對於一個註解應該長得像什
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
664 麼,都有著不同的想法,因此每一個主模式都必須以不同的方式來插入註解。每
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
665 一個主模式是一個延伸指令的名稱,使得您可以用來切換至那個模式。舉例來說,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
666 M-x fundamental-mode 就是切換到 Fundamental 模式的一個指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
667
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
668 如果您想要編輯人類語言的文字檔案 -- 像是現在的這一個,您應該使用 Text
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
669 模式。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
670
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
671 >> 鍵入 M-x text mode<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
672
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
673 不要擔心,沒有任何一個您已經學過的 Emacs 指令,會被改變成任何非常不同
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
674 的形式。但是您可以發現到 M-f 和 M-b 現在把撇號(')視為字的一部分。先
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
675 前,在 Fundamental 模式中,M-f 和 M-b 將撇號視為字的分隔符號。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
676
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
677 主模式通常會像上述那個例子一樣,做出一些精巧的改變:大部分的指令在每一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
678 個主模式中「做同樣的事」,但是它們以一點點不同的方式來工作。【再舉個例
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
679 子,接續上面所開的頭,以程式語言的註解來說。同樣一個插入註解的動作,因
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
680 為您使用的程式語言/主模式的不同而不同。若您使用 C 語言,Emacs 插入
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
681 『/* 介於中間的為註解區塊 */』;若您使用的是 Fortran 語言,Emacs 插入
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
682 『c 以字元 c 為首的為註解行』;若您使用的是 Basic 語言,Emacs 則插入『'
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
683 撇號以後的為註解文字』。編輯器的彈性如此,實在沒有必要為了不同的語言、
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
684 目的或外觀,設計特殊化的編輯器。「求大同,存小異」在這裡也是成立的。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
685
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
686 要瀏覽您現在所處的主模式的文件,鍵入 C-h m。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
687
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
688 >> 使用 C-u C-v 一或數次,將本行帶到靠近螢幕的上方。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
689 >> 鍵入 C-h m,看看 Text 模式與 Fundamental 模式是哪裡不同。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
690 >> 鍵入 C-x 1 將文件從螢幕移除掉。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
691
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
692 主模式之所以稱為「主要( major )」的原因是因為它們也有次模式( minor
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
693 mode )。次要的模式並不是主模式的其他選擇,而只是次要的更改。每一個次
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
694 模式可以被它本身啟用或停止,和所有其他的次模式無關,並且也和您的主模式
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
695 無關。所以您可以不使用次模式,或一個,或任何數量的次模式的組合。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
696
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
697 有一個叫做 Auto Fill 模式的次模式非常有用,特別是在編輯人類語言的文字
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
698 時。當這個模式啟用時, Emacs 在當您插入文字並且使一行太寬時,會將那一
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
699 行,在字與字之間自動地分隔開。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
700
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
701 您可以 M-x auto fill mode<Return> 來將 Auto Fill 模式啟用。當這個模式
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
702 啟用時,您可以使用 M-x auto fill mode<Return> 來將它取消。當這個模式不
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
703 用時,則這個指令會將它啟動,而當這個模式啟用時,這個指令會將它關閉。我
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
704 們說這個指令用來「切換( toggle )」模式。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
705
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
706 >> 現在鍵入 M-x auto fill mode<Return>。然後一再地插入字串
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
707 「 asdf 」,直到您看到它分成兩行。您必須在它們之間擺上空白,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
708 因為 Auto Fill 只在空白處斷行。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
709
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
710 邊界通常被設定為 70 個字元,但是您可以用 C-x f 指令來改變它。您應該以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
711 一個數字參數的方式來給定您所希望的邊界設定。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
712
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
713 >> 鍵入 C-x f 並附上引數 20:『C-u 2 0 C-x f』。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
714 然後鍵入一些文字,看看 Emacs 以 20 個字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
715 在行與行之間進行 fill 動作。然後再用一次 C-x f 將邊界設回 70。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
716
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
717 如果您在一個段落的中間做出改變,Auto Fill 模式並不會為您重新進行 fill
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
718 的動作( re-fill )。要 re-fill 這個段落,鍵入 M-q (META-q),而游標必
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
719 須處在其中。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
720
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
721 >> 移動游標到前一段中,然後鍵入 M-q。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
722
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
723
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
724 * 搜尋( SEARCHING )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
725 ---------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
726
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
727 Emacs 可以搜尋字串(字串可以是一群連續的字元或字)【就中文來說,字元和
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
728 字基本上意義相同;此處所指的『字』,是英文中沒有被空白隔開的字元集
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
729 合。】,往前或往後搜尋都可以。搜尋一個字串是一種游標移動指令,它會將游
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
730 標移動到字串出現的下一個地方。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
731
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
732 Emacs 搜尋指令與大部分編輯器的搜尋指令不同的地方在於,它是「漸進的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
733 ( incremental )」。這表示搜尋發生在您鍵入想要搜尋的文字串後。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
734
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
735 要開始搜尋的指令是:C-s 往前搜尋,C-r 往後搜尋。但先等一下!現在先不要
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
736 試。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
737
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
738 當您鍵入 C-s 時,會發現到有一個字串「I-search」出現在回應區中作為提示。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
739 它告訴您 Emacs 現在正處於稱為「漸進式搜尋」的狀態中,等待您鍵入您想要
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
740 搜尋的字串。<Return> 會結束一個搜尋。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
741
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
742 >> 現在鍵入 C-s 開始一個搜尋。慢一點,一次鍵入一個字元,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
743 鍵入『cursor』這個字,每鍵入一個字元時,稍微停一下,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
744 注意看看游標發生了什麼事。現在您已曾經搜尋過「cursor」這個字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
745 >> 再次鍵入 C-s 來搜尋「cursor」的下一個出現位置。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
746 >> 現在鍵入 <Delback> 四次,看看游標是如何移動的。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
747 >> 鍵入 <Return> 結束搜尋。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
748
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
749 您有沒有看到發生了什麼?在一個漸進式搜尋中,Emacs 試著要走到您鍵入的字
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
750 串的下一個出現位置。要移動到游標所在的下一個出現位置,只要再鍵入 C-s
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
751 一次。如果並沒有這樣的出現位置存在,Emacs 會嗶一聲,並告訴您目前的搜尋
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
752 「失敗」。另外 C-g 也可以用來結束搜尋。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
753
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
754 注意:在某些系統中,鍵入 C-s 將會把螢幕凍結,您將看不到從 Emacs 來的任
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
755 何輸出。這表示作業系統一個稱為「流程控制」的「功能」將 C-s 指令攔截住,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
756 並且不讓它傳到 Emacs。要取消螢幕的凍結,請鍵入 C-q。然後到 Emacs 使用
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
757 手冊中看看對於「漸進式搜尋的同時進入( Spontaneous Entry to
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
758 Incremental Search )」這個主題,以取得處理這個「功能」的建議。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
759
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
760 如果您在一個漸進式搜尋的中間,並且鍵入 <Delback>,您可以發現在搜尋字串
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
761 中的最後一個字元被消除了,並且搜尋會回到這個搜尋的最後一個地方。舉例來
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
762 說,假設您已經鍵入了『c』,用來尋找「c」的第一次出現。現在如果您鍵入
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
763 『u』,游標會移動到「cu」的第一次出現位置。現在鍵入 <Delback> ,這會將
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
764 「u」從搜尋字串中消除,並且游標會移回到「c」的第一次出現位置。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
765
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
766 如果您在一個搜尋的中間,並且鍵入一個 CONTROL 或 META 字元的話,(但有
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
767 一些例外 -- 對搜尋而言特別的字元,像是 C-s 和 C-r ),搜尋會被結束。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
768
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
769 C-s 會開始一個搜尋,它會尋找搜尋字串在目前游標位置「之後」,的任何出現
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
770 位置。如果您想要在先前文字中搜尋,鍵入 C-r 作為替代。除了搜尋的方向相
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
771 反之外,我們所說的有關 C-s 的所有事情,同樣地可以應用到 C-r 上。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
772
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
773
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
774 * 多重窗格( MULTIPLE WINDOWS )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
775 --------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
776
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
777 Emacs 許多好功能的其中之一是,您可以在螢幕中同時展示超過一個窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
778
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
779 >> 移動游標到這一行並且鍵入 C-u 0 C-l。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
780
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
781 >> 現在鍵入 C-x 2,它會將螢幕平分成兩個窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
782 這兩個窗格都顯示著這個快速指南。游標則停留在上方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
783
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
784 >> 鍵入 C-M-v 以捲動下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
785 (如果您並沒有一個真的 META 鍵,則鍵入 ESC C-v 亦可。)
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
786
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
787 >> 鍵入 C-x o(『o』指的是其他『other』的意思),
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
788 將游標移動到下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
789
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
790 >> 在下方的窗格中,使用 C-v 和 M-v 來捲動它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
791 繼續維持在上方的窗格中閱讀這些指引。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
792
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
793 >> 再一次鍵入 C-x o 將游標移回到上方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
794 游標會回到它在上方窗格中,原本所在的位置。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
795
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
796 您可以持續使用 C-x o 在窗格之間切換。每一個窗格有它自己的游標位置,但
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
797 是只有一個窗格會真的顯示出游標。所有通常的編輯指令只會應用到那個游標所
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
798 在的窗格。我們稱這個為「被選擇的窗格」。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
799
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
800 指令 C-M-v 在當您於一個窗格中編輯文字,並使用其他的窗格作為參考之用時,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
801 是非常有用的。您可以將游標一直保持在您正在編輯的窗格中,並以 C-M-v 指
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
802 令在其他的窗格循序地前進。【驗證工作特別適合以這種方式來進行,如 GNU
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
803 中譯小組:找一個原始英文檔案;再找它翻譯好的中文檔案,編輯這個「被選擇
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
804 的窗格」,以 C-M-v 指令跟上驗證中的段落……。】
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
805
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
806 C-M-v 是 CONTROL-META 字元的一個例子。如果您有一個真的 META 鍵,您可以
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
807 同時按住 CONTROL 和 META 再鍵入 v 來鍵入 C-M-v。CONTROL 或 META 「誰先
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
808 被按住」並沒有影響,因為這兩個鍵都是用來修飾您所鍵入的字元。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
809
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
810 如果您並沒有一個真的 META 鍵,您可以使用 ESC 來作為替代,這樣子順序就
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
811 有關係了:您必須鍵入 ESC ,跟著鍵入 CONTROL-v,CONTROL-ESC v 並不會作
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
812 用。這是因為 ESC 是一個具有本身作用的字元,而不是一個修飾鍵。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
813
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
814 >> (在上方窗格)鍵入 C-x 1 以除去下方窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
815
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
816 (如果您已經在底端的窗格鍵入 C-x 1,那麼將會把上面的窗格隱藏住。將這個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
817 指令想像成「只保留一個窗格 -- 我正在編輯的這個。」)
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
818
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
819 您不需要在兩個不同的窗格中顯示相同的緩衝區。如果您使用 C-x C-f 在一個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
820 窗格中找檔案,另一個窗格並不因而改變。您可以在獨立的任一個窗格中找〔它
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
821 自己的〕一個檔案。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
822
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
823 這裡有另外一個方式可以用來,使用兩個窗格顯示兩個不同的東西:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
824
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
825 >> 鍵入 C-x 4 C-f,後面跟著您的其中一個檔案的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
826 以 <Return> 作為結束。看看指定的檔案出現在下方的窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
827 游標也跑到那裡。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
828
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
829 >> 鍵入 C-x o 以回到上方的窗格,然後以 C-x 1 刪除掉下方窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
830
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
831
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
832 * 遞迴編輯階層( RECURSIVE EDITING LEVELS )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
833 --------------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
834
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
835 有時候您會進入所謂的「遞迴編輯階層」。它是由位在狀態行的方括弧所指明,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
836 並且包含住以小括弧來指明的模式名稱。舉例來說,您可能會看到
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
837 [(Fundamental)],而不是 (Fundamental)。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
838
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
839 要離開遞迴編輯階層,請鍵入 ESC ESC ESC。這是個全功能的「離開」指令。您
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
840 也可以使用它來除去多餘的窗格,並且離開小緩衝區。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
841
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
842 >> 鍵入 M-x 以進入小緩衝區;然後鍵入 ESC ESC ESC 離開。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
843
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
844 您無法使用 C-g 來離開遞迴編輯階層。這是因為 C-g 是用來取消指令以及「位
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
845 於」遞迴編輯階層中的「引數( arguments )」之故。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
846
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
847
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
848 * 取得更多的幫助( GETTING MORE HELP )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
849 ---------------------------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
850
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
851 在本快速指南中,我們試著僅提供剛剛好的資訊讓您可以開始使用 Emacs。在
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
852 Emacs 中有太多可取得的資訊,想要在這裡全部解釋是不可能的。然而,您也許
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
853 會想要學習更多 Emacs 相關的資訊,因為它有許多其他有用的功能。Emacs 提
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
854 供了「閱讀有關 Emacs 指令」的指令。這些「help」指令都以 CONTROL-h 這個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
855 字元作為開頭,稱作為「Help 字元」。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
856
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
857 要使用 Help 功能,鍵入 C-h 字元,然後再鍵入一個說明您所需要的幫助的字
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
858 元。如果您真的不知道要問什麼,那麼請鍵入『C-h ?』,此時 Emacs 將會告訴
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
859 您它能夠提供的幫助。如果您已經鍵入 C-h,但發現您並不需要任何幫助,鍵入
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
860 C-g 來取消掉它就是了。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
861
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
862 (有些網站將 C-h 這個字元的意義改變了。他們真的不應該把它設為對所有使
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
863 用者全部都適用的方法,所以您現在就有了個理由來抱怨系統管理者了。在此同
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
864 時,如果 C-h 並沒有在窗格的底部顯示任何有關幫助的訊息,試著鍵入 F1 鍵,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
865 或是 M-x help <Return>。)
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
866
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
867 最基本的 HELP 功能是 C-h c。鍵入 C-h,字元 c,以及一個或一串字元;然後
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
868 Emacs 會顯示一個非常簡短的有關這個指令的解釋。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
869
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
870 >> 鍵入 C-h c C-p。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
871
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
872 訊息應該會像是這樣:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
873
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
874 C-p runs the command previous-line
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
875
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
876 這告訴了您「函數的名稱」。函數名稱主要是用來自訂以及擴充 Emacs。但是由
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
877 於函數名稱是由「用來指出這指令在做些什麼」而被選定,它們因此也可以作為
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
878 非常簡短的文件 -- 足夠提醒您已經學過的指令。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
879
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
880 多字元指令像是 C-x C-s 和 (如果您沒有 META 或 EDIT 或 ALT 鍵)<ESC>v
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
881 也可以在 C-h c 後面出現。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
882
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
883 要取得更多有關一個指令的資訊,用 C-h k 來取代使用 C-h c 。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
884
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
885 >> 鍵入 C-h k C-p。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
886
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
887 這會在一個 Emacs 窗格顯示這個函數的說明文件以及它的名稱。當您閱讀完後,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
888 鍵入 C-x 1 以跳離這些幫助文字。您並不需要馬上跟著做。您可以做些編輯,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
889 當參考到幫助文字時再鍵入 C-x 1。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
890
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
891 這裡有一些其他有用的 C-h 選項:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
892
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
893 C-h f 解釋一個函數。您要鍵入此函數的名稱。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
894
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
895 >> 試著鍵入 C-h f previous-line<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
896 這會印出 Emacs 所有的有關「實作出 C-p 這個指令的函數」的資訊
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
897
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
898 C-h v 這個類似的指令會顯示出「您可以用來自訂 Emacs 行為的變數」的文件。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
899 當 Emacs 要求時,您需要鍵入這變數的名稱。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
900
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
901 C-h a 指令相關查找( Command Apropos )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
902 鍵入一個關鍵字然後 Emacs 會列出所有
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
903 「在其名稱中含有此關鍵字」的全部指令。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
904 這些指令全部都可以經由 META-x 來啟動。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
905 對於一些指令而言,指令相關查找也會列出
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
906 「可以執行相同指令」的一個或兩個字元的串列。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
907
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
908 >> 鍵入 C-h a file<Return>。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
909
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
910 這會在另一個窗格顯示一個「在其名稱中含有『file』的全部 M-x 指令」的列
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
911 表。您將會看到像是 C-x C-f 的「字元-指令」列在其相對應指令名稱(如:
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
912 find-file )的旁邊。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
913
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
914 >> 鍵入 C-M-v 上下移動 help 窗格。試個幾次。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
915
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
916 >> 鍵入 C-x 1 來刪除 help 窗格。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
917
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
918 C-h i 閱讀線上使用手冊( a.k.a. Info )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
919 這個指令將您帶到了稱為「*info*」的特殊緩衝區,在那,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
920 您可以閱讀安裝在您的系統裡的軟體套件的線上使用手冊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
921 鍵入 m emacs <Return> 以閱讀 Emacs 使用手冊。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
922 如果您在此之前未曾使用過 Info 系統,請鍵入『?』。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
923 Emacs 將會帶您進入 Info 模式功能的導覽指南。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
924 一旦完成了本快速指南的研讀,您應該查閱 Emacs Info
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
925 使用手冊,以作為主要的參考文件。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
926
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
927
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
928 * 更多功能特色( MORE FEATURES )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
929 ---------------------------------
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
930
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
931 您可以經由閱讀 Emacs 使用手冊〈不論是一本書或是在 Info 中的線上版本
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
932 (使用 Help 選單或是鍵入 F10 h r )〉來學到更多有關它的知識。有兩個您
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
933 可能會特別喜歡的功能特色是可以節省打字量的 completion 還有簡化檔案處理
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
934 的 dired 。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
935
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
936 Completion 是一種避免不必要的打字的方式。舉例來說,如果您想要切換
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
937 *Messages* 緩衝區,您可以鍵入 C-x b *M<Tab> ,只要可以從您已經鍵入的文
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
938 字中確定, Emacs 就會將剩下的緩衝區名稱補齊。 Completion 是在 Emacs 使
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
939 用手冊的 Info 中,稱為「Completion」的節點中所解釋的。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
940
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
941 Dired 使您可以在一個目錄中列出檔案(次目錄則是可選的)、在列表中到處移
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
942 動、拜訪、重新命名、刪除以及對檔案作操作。 Dired 是在 Emacs 使用手冊的
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
943 Info 中,稱為「Dired」的節點中所解釋的。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
944
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
945 使用手冊也解釋了許多其它 Emacs 的功能特色。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
946
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
947
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
948 * 結論( CONCLUSION )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
949 ----------------------
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
950
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
951 記住,要完全離開 Emacs 請使用 C-x C-c 。要暫時離開到 shell,稍後再回到
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
952 Emacs,請使用 C-z 。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
953
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
954 本快速指南對於所有的新手應該都是易於理解的,所以如果您發現了什麼地方不
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
955 清楚,不要只是坐著怪自己 -- (向本文作者和翻譯)發點牢騷吧!
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
956
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
957
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
958 * 翻譯( TRANSLATION )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
959 -----------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
960
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
961 本快速指南的翻譯人員列表如下,如果您在閱讀本文之前,「完全」對 Emacs
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
962 沒有概念,請告訴我們您的意見以作為本文後續的改進依據。翻譯也提供了一份
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
963 《GNU Emacs 中文處理說明》在
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
964 http://www.gnu.org/software/chinese/guide/emacs-chinese.zh.html 〈部份
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
965 內容已經整理到本快速指南〉,也請您自行參閱。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
966
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
967 編輯器是電腦使用者最常接觸到的應用程式,因此不應該讓初學者感到過於困難,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
968 就一般的評論來說, Emacs 是不難學會使用的編輯器,但您的意見可以使它更
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
969 為貼近一般的使用者,並使電腦作為工具的角色得以充分發揮。如果您願意提供
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
970 改進的意見,請寄 email 到<chinese-translators@gnu.org> 。請不要害羞,
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
971 我們歡迎任何有關的討論;如果您不想寄到郵件清單,請直接 email 給本文翻
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
972 譯 <chliu@gnu.org> 。請在 Title 行中包含此字串「Emacs TUTORIAL: <your
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
973 issue here>」。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
974
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
975 如果您是 Emacs 老手,GNU Chinese Translators Team (GNU/CTT)
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
976 <http://www.gnu.org/software/chinese/> 歡迎您的加入,我們現在正需要願
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
977 意投入翻譯 Emacs 使用手冊的人員。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
978
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
979 本快速指南並沒有採用習慣上編輯器所使用的翻譯術語,一方面因為它的實際意
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
980 義與一般的編輯器不同,原文本就不同;另一方面也因為 Emacs 所採用的視覺
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
981 設計概念,早在視窗化系統之前就已經存在,本質也不相同。總之,翻譯以為這
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
982 樣可以幫助對於 Emacs 整個設計哲學的理解。如果收到的回覆中,大部份要求
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
983 提出修改,我們還是從善如流。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
984
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
985 (0) 為了避免「游標移動指令」論述上的混淆,本文採用的術語為:
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
986 往「前」移( move Forward );往「後」移( move Backware )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
987 〔或是往「回」移〕;
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
988 往「上」移( Previous line );往「下」移( Next line )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
989 (1) 在本文中,「行」指的是 row,這是採用一般的習慣用法。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
990 為了避免誤導中文讀者,特別在此說明。在正式的用法中:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
991 「column」翻譯為「行」,以「縱」為行(直行),也譯為「欄」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
992 「row」翻譯為「列」,以「橫」為列(橫列)。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
993 讀者思索一下「合縱連橫」應該可以理解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
994 大約是因為中文原本是直書的,我們說「一行字」是沒問題;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
995 但現在大部份的情形中文是橫書的,由於習慣使然也稱為一行字了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
996 (2) 有關於「文字」及其集合的相關譯文,翻譯所採用的有:
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
997 編輯的「文字」:「然後鍵入一些文字」;
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
998 用來作為說明功能的「文件」:「這個函數的說明文件」;
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
999 特指其所說明的內容的「文本」:「實際效力以英文本為準」。
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1000 即使只是「一行字」,只要它是用來作為說明之用,
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1001 翻譯還是將它視為「文件」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1002 (3) 「cut」的動作在 Emacs 中分為「殺掉」和「刪除」,之間的差異如下:
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1003 一般編輯器中的「cut」:只有最近被 cut 的文字擺到 clipboard 中;
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1004 「殺掉( killing )」:被殺掉的文字,全部被加入到 kill ring 中;
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1005 「刪除( deleting )」:被刪除的文字,就是被刪除了。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1006 因此在一般編輯器中,您只能 paste「最近」被 cut 的文字;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1007 而在 Emacs 中,您可以「拉回」任何先前被殺掉的文字,同時,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1008 它的作法很容易。至於被刪除的,因為用來作為「刪除」功能的指令,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1009 所能移去的文字數量都很少,因此也沒什麼好拉回的;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1010 如果真的想回復這些文字,undo 您的動作就是了。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1011 (4) 「window」同時翻譯為「視窗」和「窗格」,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1012 前者表示現在一般概念中的視窗系統,如「X 視窗」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1013 後者表示 Emacs 中的視窗,翻譯在此通稱為「窗格」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1014 Emacs 的「窗格」即使在命令列提示下也可以正常工作,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1015 此一基本特性顯然值得我們以另一個專用術語來描述它。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1016 (5) 關於檔案的術語,「找」一個檔案在 Emacs 中有兩種作用:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1017 找一個「並不存在」的檔案,讀者應認知為「開新檔案」;
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1018 找一個「已經存在」的檔案,則是「開啟舊檔」。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1019 Emacs 只以一個「找」的動作來解決,主要的原因是「實際上」
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1020 的軟體工作如此。駭客們應該會發現這樣比較自然,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1021 因為它反應了電腦的工作方式,同時操作起來也較少廢話。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1022 (6) 在【】中的文字為翻譯的註解。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1023 (7) 關於使中文文件結構化的議題,問題已經獲得解決。
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1024 (8) 本翻譯文本所採用的簡繁用語差異列表如下:
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1025 zh cn
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1026 文件 文檔
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1027 軟體 軟件
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1028 作業 操作
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1029 套件 包
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1030 視窗 窗口
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1031 遞迴 遞歸
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1032 駭客 黑客
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1033 資訊 信息
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1034
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1035 另外,我們也十分歡迎讀者可以直接修改本快速指南,做出自己的版本,以自己
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1036 認為最為合適的方式來介紹 Emacs 。如果您做出了這樣個人化的版本,並且認
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1037 為足供大家參考使用,請寄給 <chinese-coordinators@gnu.org> ,我們會將您
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1038 的版本公開在 GNU/CTT 的網頁中提供給中文使用者下載。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1039
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1040 翻譯:劉 昭宏 <chliu@gnu.org>
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1041 驗證:馬 雪萍
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1042
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1043
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1044 * 複製( COPYING )
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1045 -------------------
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1046
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1047 本快速指南沿襲自具有悠久歷史的 Emacs 快速指南,由 Stuart Cracraft 為了
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1048 原始的 Emacs 所撰寫的版本開始。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1049
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1050 這個版本的快速指南和 GNU Emacs 一樣都是版權化的,並且允許在某些條件下
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1051 散佈其拷貝:
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1052
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1053 Copyright (c) 1985, 1996, 1998, 2001, 2002 Free Software Foundation
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1054 Chinese Translation by Chao-Hong Liu (2002, 2003)
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1055
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1056 Permission is granted to anyone to make or distribute verbatim copies
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1057 of this document as received, in any medium, provided that the
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1058 copyright notice and permission notice are preserved,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1059 and that the distributor grants the recipient permission
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1060 for further redistribution as permitted by this notice.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1061
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1062 本文允許在不變更文件內容的前提下刊登在任何形式的媒體中,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1063 但需保留版權聲明以及許可聲明,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1064 散佈者也必須給予接受者如同此聲明所允許的,進一步散佈的許可。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1065 【本段譯文提供讀者作為參考以幫助理解,實際效力以英文本為準。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1066
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1067 Permission is granted to distribute modified versions
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1068 of this document, or of portions of it,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1069 under the above conditions, provided also that they
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1070 carry prominent notices stating who last altered them.
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1071
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1072 本文允許在與上述相同的條件下,散佈修改後的版本,或是其中的一部份,
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1073 但它們也必須帶有顯著的,說明由誰最後更動了它的聲明。
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1074 【Copyleft 版權除了提供使用者自由外,也維護原始作者,
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1075 以及後來的修改作者的名譽權( credit )。
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1076 本段譯文提供讀者作為參考以幫助理解,實際效力以英文本為準。】
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1077
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1078 複製 Emacs 本身的條件較為複雜,但是具有相同的精神。請閱讀 COPYING 這個
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1079 檔案,並且確實給予您的朋友 GNU Emacs 的拷貝。請經由「使用、撰寫、以及
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1080 分享自由軟體」來幫助消除軟體障礙主義(擁有權)!
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1081
51138
3b5f7614fdcc Updated.
Kenichi Handa <handa@m17n.org>
parents: 50009
diff changeset
1082 ;;; DO NOT PUT THIS ON ZHS OR ZHT FILE...
50009
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1083 ;;; Local Variables:
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1084 ;;; coding: chinese-big5
173ef569a9e0 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 49994
diff changeset
1085 ;;; End:
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 51138
diff changeset
1086
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 51138
diff changeset
1087 ;;; arch-tag: a51dafb4-e602-432b-8020-5d5d5f150811