annotate runtime/tutor/tutor.zh.utf-8 @ 1845:dc81a4fc6318 v7.2.143

updated for version 7.2-143
author vimboss
date Wed, 18 Mar 2009 11:52:53 +0000
parents 18ee39301b82
children 1e8ebf870720
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
1 ===============================================================================
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
2 = 歡 迎 閱 讀 《 V I M 教 程 》 ── 版本 1.5 =
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
3 ===============================================================================
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
4 vim 是一個具有很多命令的功能非常強大的編輯器。限于篇幅,在本教程當中
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
5 不就詳細介紹了。本教程的設計目標是講述一些必要的基本命令,而掌握好這
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
6 些命令,您就能夠很容易將vim當作一個通用的萬能編輯器來使用了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
7
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
8 完成本教程的內容大約需要25-30分鐘,取決于您訓練的時間。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
9
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
10 每一節的命令操作將會更改本文。推薦您復制本文的一個副本,然後在副本上
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
11 進行訓練(如果您是通過"vimtutor"來啟動教程的,那麼本文就已經是副本了)。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
12
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
13 切記一點︰本教程的設計思路是在使用中進行學習的。也就是說,您需要通過
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
14 執行命令來學習它們本身的正確用法。如果您只是閱讀而不操作,那麼您可能
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
15 會很快遺忘這些命令的!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
16
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
17 好了,現在請確定您的Shift-Lock(大小寫鎖定鍵)還沒有按下,然後按鍵盤上
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
18 的字母鍵 j 足夠多的次數來移動光標,直到第一節的內容能夠完全充滿屏幕。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
19
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
21 第一講第一節︰移動光標
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
22
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
23
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
24 ※※ 要移動光標,請依照說明分別按下 h、j、k、l 鍵。 ※※
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
25
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
26 ^
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
27 k 提示︰ h 的鍵位于左邊,每次按下就會向左移動。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
28 < h l > l 的鍵位于右邊,每次按下就會向右移動。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
29 j j 鍵看起來很象一支尖端方向朝下的箭頭。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
30 v
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
31
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
32 1. 請隨意在屏幕內移動光標,直至您覺得舒服為止。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
33
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
34 2. 按下下行鍵(j),直到出現光標重復下行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
35
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
36 ---> 現在您應該已經學會如何移動到下一講吧。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
37
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
38 3. 現在請使用下行鍵,將光標移動到第二講。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
39
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
40 提示︰如果您不敢確定您所按下的字母,請按下<ESC>鍵回到正常(Normal)模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
41 然後再次從鍵盤輸入您想要的命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
42
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
43 提示︰光標鍵應當也能正常工作的。但是使用hjkl鍵,在習慣之後您就能夠快速
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
44 地在屏幕內四處移動光標了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
45
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
47 第一講第二節︰VIM的進入和退出
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
48
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
49
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
50 !! 特別提示︰敬請閱讀完整本一節的內容,然後才能執行以下所講解的命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
51
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
52 1. 請按<ESC>鍵(這是為了確保您處在正常模式)。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
53
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
54 2. 然後輸入︰ :q! <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
55
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
56 ---> 這種方式的退出編輯器絕不會保存您進入編輯器以來所做的改動。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
57 如果您想保存更改再退出,請輸入︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
58 :wq <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
59
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
60 3. 如果您看到了命令行提示符,請輸入能夠帶您回到本教程的命令,那就是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
61
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
62 vimtutor <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
63
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
64 通常情況下您也可以用這種方式︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
65
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
66 vim tutor <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
67
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
68 ---> 這裡的 'vim' 表示進入vim編輯器,而 'tutor'則是您準備要編輯的文件。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
69
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
70 4. 如果您自信已經牢牢記住了這些步驟的話,請從步驟1執行到步驟3退出,然
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
71 後再次進入編輯器。接著將光標移動到第一講第三節來繼續我們的教程講解。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
72
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
73 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
74 第一講第三節︰文本編輯之刪除
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
75
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
76
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
77 ** 在正常(Normal)模式下,可以按下 x 鍵來刪除光標所在位置的字符。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
78
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
79 1. 請將光標移動到本節中下面標記有 ---> 的那一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
80
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
81 2. 為了修正輸入錯誤,請將光標移至準備刪除的字符的位置處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
82
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
83 3. 然後按下 x 鍵將錯誤字符刪除掉。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
84
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
85 4. 重復步驟2到步驟4,直到句子修正為止。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
86
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
87 ---> The ccow jumpedd ovverr thhe mooon.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
88
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
89 5. 好了,該行已經修正了,下一節內容是第一講第四節。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
90
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
91 特別提示︰在您瀏覽本教程時,不要強行記憶。記住一點︰在使用中學習。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
92
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
93
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
94
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
95 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
96 第一講第四節︰文本編輯之插入
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
97
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
98
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
99 ** 在正常模式下,可以按下 i 鍵來插入文本。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
100
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
101 1. 請將光標移動到本節中下面標記有 ---> 的第一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
102
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
103 2. 為了使得第一行內容雷同于第二行,請將光標移至文本第一個字符準備插入
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
104 的位置。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
105
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
106 3. 然後按下 i 鍵,接著輸入必要的文本字符。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
107
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
108 4. 所有文本都修正完畢,請按下 <ESC> 鍵返回正常模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
109 重復步驟2至步驟4以便修正句子。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
110
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
111 ---> There is text misng this .
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
112 ---> There is some text missing from this line.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
113
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
114 5. 如果您對文本插入操作已經很滿意,請接著閱讀下面的小結。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
115
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
116
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
117
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
118 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
119 第一講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
120
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
121
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
122 1. 光標在屏幕文本中的移動既可以用箭頭鍵,也可以使用 hjkl 字母鍵。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
123 h (左移) j (下行) k (上行) l (右移)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
124
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
125 2. 欲進入vim編輯器(從命令行提示符),請輸入︰vim 文件名 <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
126
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
127 3. 欲退出vim編輯器,請輸入以下命令放棄所有修改︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
128
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
129 <ESC> :q! <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
130
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
131 或者輸入以下命令保存所有修改︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
132
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
133 <ESC> :wq <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
134
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
135 4. 在正常模式下刪除光標所在位置的字符,請按︰ x
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
136
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
137 5. 在正常模式下要在光標所在位置開始插入文本,請按︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
138
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
139 i 輸入必要文本 <ESC>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
140
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
141 特別提示︰按下 <ESC> 鍵會帶您回到正常模式或者取消一個不期望或者部分完成
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
142 的命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
143
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
144 好了,第一講到此結束。下面接下來繼續第二講的內容。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
145
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
146
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
147 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
148 第二講第一節︰刪除類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
149
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
150
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
151 ** 輸入 dw 可以從光標處刪除至一個單字/單詞的末尾。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
152
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
153 1. 請按下 <ESC> 鍵確保您處于正常模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
154
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
155 2. 請將光標移動到本節中下面標記有 ---> 的那一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
156
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
157 3. 請將光標移至準備要刪除的單詞的開始。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
158
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
159 4. 接著輸入 dw 刪除掉該單詞。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
160
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
161 特別提示︰您所輸入的 dw 會在您輸入的同時出現在屏幕的最後一行。如果您輸
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
162 入有誤,請按下 <ESC> 鍵取消,然後重新再來。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
163
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
164 ---> There are a some words fun that don't belong paper in this sentence.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
165
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
166 5. 重復步驟3至步驟4,直至句子修正完畢。接著繼續第二講第二節內容。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
167
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
168
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
169
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
170 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
171 第二講第二節︰其他刪除類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
172
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
173
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
174 ** 輸入 d$ 從當前光標刪除到行末。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
175
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
176 1. 請按下 <ESC> 鍵確保您處于正常模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
177
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
178 2. 請將光標移動到本節中下面標記有 ---> 的那一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
179
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
180 3. 請將光標移動到該行的尾部(也就是在第一個點號‘.’後面)。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
181
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
182 4. 然後輸入 d$ 從光標處刪至當前行尾部。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
183
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
184 ---> Somebody typed the end of this line twice. end of this line twice.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
185
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
186
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
187 5. 請繼續學習第二講第三節就知道是怎麼回事了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
188
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
189
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
190
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
191
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
192
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
193 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
194 第二講第三節︰關于命令和對象
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
195
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
196
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
197 刪除命令 d 的格式如下︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
198
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
199 [number] d object 或者 d [number] object
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
200
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
201 其意如下︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
202 number - 代表執行命令的次數(可選項,缺省設置為 1 )。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
203 d - 代表刪除。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
204 object - 代表命令所要操作的對象(下面有相關介紹)。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
205
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
206 一個簡短的對象列表︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
207 w - 從當前光標當前位置直到單字/單詞末尾,包括空格。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
208 e - 從當前光標當前位置直到單字/單詞末尾,但是 *不* 包括空格。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
209 $ - 從當前光標當前位置直到當前行末。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
210
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
211 特別提示︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
212 對于勇于探索者,請在正常模式下面僅按代表相應對象的鍵而不使用命令,則
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
213 將看到光標的移動正如上面的對象列表所代表的一樣。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
214
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
215
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
216
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
217
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
218 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
219 第二講第四節︰對象命令的特殊情況
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
220
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
221
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
222 ** 輸入 dd 可以刪除整一個當前行。 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
223
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
224 鑒于整行刪除的高頻度,VIM 的設計者決定要簡化整行刪除,僅需要在同一行上
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
225 擊打兩次 d 就可以刪除掉光標所在的整行了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
226
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
227 1. 請將光標移動到本節中下面的短句段落中的第二行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
228 2. 輸入 dd 刪除該行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
229 3. 然後移動到第四行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
230 4. 接著輸入 2dd (還記得前面講過的 number-command-object 嗎?) 刪除兩行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
231
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
232 1) Roses are red,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
233 2) Mud is fun,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
234 3) Violets are blue,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
235 4) I have a car,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
236 5) Clocks tell time,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
237 6) Sugar is sweet
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
238 7) And so are you.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
239
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
240
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
241 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
242 第二講第五節︰撤消類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
243
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
244
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
245 ** 輸入 u 來撤消最後執行的命令,輸入 U 來修正整行。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
246
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
247 1. 請將光標移動到本節中下面標記有 ---> 的那一行,並將其置于第一個錯誤
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
248 處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
249 2. 輸入 x 刪除第一個不想保留的字母。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
250 3. 然後輸入 u 撤消最後執行的(一次)命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
251 4. 這次要使用 x 修正本行的所有錯誤。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
252 5. 現在輸入一個大寫的 U ,恢復到該行的原始狀態。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
253 6. 接著多次輸入 u 以撤消 U 以及更前的命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
254 7. 然後多次輸入 CTRL-R (先按下 CTRL 鍵不放開,接著輸入 R 鍵) ,這樣就
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
255 可以執行恢復命令,也就是撤消掉撤消命令。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
256
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
257 ---> Fiix the errors oon thhis line and reeplace them witth undo.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
258
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
259 8. 這些都是非常有用的命令。下面是第二講的小結了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
260
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
261
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
262
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
263
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
264 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
265 第二講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
266
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
267
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
268 1. 欲從當前光標刪除至單字/單詞末尾,請輸入︰dw
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
269
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
270 2. 欲從當前光標刪除至當前行末尾,請輸入︰d$
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
271
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
272 3. 欲刪除整行,請輸入︰dd
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
273
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
274 4. 在正常模式下一個命令的格式是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
275
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
276 [number] command object 或者 command [number] object
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
277 其意是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
278 number - 代表的是命令執行的次數
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
279 command - 代表要做的事情,比如 d 代表刪除
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
280 object - 代表要操作的對象,比如 w 代表單字/單詞,$ 代表到行末等等。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
281 $ (to the end of line), etc.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
282
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
283 5. 欲撤消以前的操作,請輸入︰u (小寫的u)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
284 欲撤消在一行中所做的改動,請輸入︰U (大寫的U)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
285 欲撤消以前的撤消命令,恢復以前的操作結果,請輸入︰CTRL-R
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
286
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
287 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
288 第三講第一節︰置入類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
289
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
290
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
291 ** 輸入 p 將最後一次刪除的內容置入光標之後 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
292
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
293 1. 請將光標移動到本節中下面示范段落的首行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
294
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
295 2. 輸入 dd 將該行刪除,這樣會將該行保存到vim的緩沖區中。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
296
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
297 3. 接著將光標移動到準備置入的位置的上方。記住︰是上方哦。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
298
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
299 4. 然後在正常模式下(<ESC>鍵進入),輸入 p 將該行粘貼置入。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
300
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
301 5. 重復步驟2至步驟4,將所有的行依序放置到正確的位置上。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
302
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
303 d) Can you learn too?
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
304 b) Violets are blue,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
305 c) Intelligence is learned,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
306 a) Roses are red,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
307
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
308
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
309
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
310 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
311 第三講第二節︰替換類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
312
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
313
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
314 ** 輸入 r 和一個字符替換光標所在位置的字符。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
315
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
316 1. 請將光標移動到本節中下面標記有 ---> 的第一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
317
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
318 2. 請移動光標到第一個錯誤的適當位置。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
319
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
320 3. 接著輸入 r ,這樣就能將錯誤替換掉了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
321
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
322 4. 重復步驟2和步驟3,直到第一行已經修改完畢。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
323
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
324 ---> Whan this lime was tuoed in, someone presswd some wrojg keys!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
325 ---> When this line was typed in, someone pressed some wrong keys!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
326
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
327 5. 然後我們繼續學校第三講第三節。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
328
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
329 特別提示︰切記您要在使用中學習,而不是在記憶中學習。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
330
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
331
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
332
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
333 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
334 第三講第三節︰更改類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
335
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
336
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
337 ** 要改變一個單字/單詞的部分或者全部,請輸入 cw **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
338
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
339 1. 請將光標移動到本節中下面標記有 ---> 的第一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
340
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
341 2. 接著把光標放在單詞 lubw 的字母 u 的位置那裡。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
342
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
343 3. 然後輸入 cw 就可以修正該單詞了(在本例這裡是輸入 ine 。)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
344
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
345 4. 最後按 <ESC> 鍵,然後光標定位到下一個錯誤第一個準備更改的字母處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
346
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
347 5. 重復步驟3和步驟4,直到第一個句子完全雷同第二個句子。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
348
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
349 ---> This lubw has a few wptfd that mrrf changing usf the change command.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
350 ---> This line has a few words that need changing using the change command.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
351
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
352 提示︰請注意 cw 命令不僅僅是替換了一個單詞,也讓您進入文本插入狀態了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
353
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
354
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
355
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
356 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
357 第三講第四節︰使用c指令的其他更改類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
358
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
359
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
360 ** 更改類指令可以使用同刪除類命令所使用的對象參數。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
361
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
362 1. 更改類指令的工作方式跟刪除類命令是一致的。操作格式是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
363
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
364 [number] c object 或者 c [number] object
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
365
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
366 2. 對象參數也是一樣的,比如 w 代表單字/單詞,$代表行末等等。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
367
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
368 3. 請將光標移動到本節中下面標記有 ---> 的第一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
369
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
370 4. 接著將光標移動到第一個錯誤處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
371
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
372 5. 然後輸入 c$ 使得該行剩下的部分更正得同第二行一樣。最後按 <ESC> 鍵。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
373
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
374 ---> The end of this line needs some help to make it like the second.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
375 ---> The end of this line needs to be corrected using the c$ command.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
376
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
377
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
378
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
379 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
380 第三講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
381
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
382
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
383 1. 要重新置入已經刪除的文本內容,請輸入小寫字母 p。該操作可以將已刪除
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
384 的文本內容置于光標之後。如果最後一次刪除的是一個整行,那麼該行將置
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
385 于當前光標所在行的下一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
386
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
387 2. 要替換光標所在位置的字符,請輸入小寫的 r 和要替換掉原位置字符的新字
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
388 符即可。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
389
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
390 3. 更改類命令允許您改變指定的對象,從當前光標所在位置直到對象的末尾。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
391 比如輸入 cw 可以替換當前光標到單詞的末尾的內容;輸入 c$ 可以替換當
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
392 前光標到行末的內容。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
393
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
394 4. 更改類命令的格式是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
395
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
396 [number] c object 或者 c [number] object
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
397
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
398 下面我們繼續學習下一講。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
399
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
400
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
401
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
402 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
403 第四講第一節︰定位及文件狀態
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
404
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
405
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
406 ** 輸入 CTRL-g 顯示當前編輯文件中當前光標所在行位置以及文件狀態信息。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
407 輸入 SHIFT-G 則直接跳轉到文件中的某一指定行。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
408
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
409 提示︰切記要先通讀本節內容,之後才可以執行以下步驟!!!
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
410
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
411 1. 按下 CTRL 鍵不放開然後按 g 鍵。然後就會看到頁面最底部出現一個狀態信
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
412 息行,顯示的內容是當前編輯的文件名和文件的總行數。請記住步驟3的行號。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
413
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
414 2. 按下 SHIFT-G 鍵可以使得當前光標直接跳轉到文件最後一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
415
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
416 3. 輸入您曾停留的行號,然後按下 SHIFT-G。這樣就可以返回到您第一次按下
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
417 CTRL-g 時所在的行好了。注意︰輸入行號時,行號是不會在屏幕上顯示出來
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
418 的。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
419
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
420 4. 如果願意,您可以繼續執行步驟1至步驟三。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
421
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
422
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
423
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
424 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
425 第四講第二節︰搜索類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
426
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
427
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
428 ** 輸入 / 以及尾隨的字符串可以用以在當前文件中查找該字符串。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
429
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
430 1. 在正常模式下輸入 / 字符。您此時會注意到該字符和光標都會出現在屏幕底
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
431 部,這跟 : 命令是一樣的。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
432
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
433 2. 接著輸入 errroor <回車>。那個errroor就是您要查找的字符串。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
434
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
435 3. 要查找同上一次的字符串,只需要按 n 鍵。要向相反方向查找同上一次的字
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
436 符串,請輸入 Shift-N 即可。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
437
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
438 4. 如果您想逆向查找字符串,請使用 ? 代替 / 進行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
439
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
440 ---> When the search reaches the end of the file it will continue at the start.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
441
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
442 "errroor" is not the way to spell error; errroor is an error.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
443
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
444 提示︰如果查找已經到達文件末尾,查找會自動從文件頭部繼續查找。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
445
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
446
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
447
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
448 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
449 第四講第三節︰配對括號的查找
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
450
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
451
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
452 ** 按 % 可以查找配對的括號 )、]、}。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
453
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
454 1. 把光標放在本節下面標記有 --> 那一行中的任何一個 (、[ 或 { 處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
455
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
456 2. 接著按 % 字符。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
457
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
458 3. 此時光標的位置應當是在配對的括號處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
459
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
460 4. 再次按 % 就可以跳回配對的第一個括號處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
461
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
462 ---> This ( is a test line with ('s, ['s ] and {'s } in it. ))
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
463
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
464 提示︰在程序調試時,這個功能用來查找不配對的括號是很有用的。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
465
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
466
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
467
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
468
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
469
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
470
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
471 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
472 第四講第四節︰修正錯誤的方法之一
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
473
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
474
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
475 ** 輸入 :s/old/new/g 可以替換 old 為 new。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
476
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
477 1. 請將光標移動到本節中下面標記有 ---> 的那一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
478
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
479 2. 輸入 :s/thee/the <回車> 。請注意該命令只改變光標所在行的第一個匹配
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
480 串。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
481
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
482 3. 輸入 :s/thee/the/g 則是替換全行的匹配串。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
483
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
484 ---> the best time to see thee flowers is in thee spring.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
485
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
486 4. 要替換兩行之間出現的每個匹配串,請輸入 :#,#s/old/new/g (#,#代表的是
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
487 兩行的行號)。輸入 :%s/old/new/g 則是替換整個文件中的每個匹配串。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
488
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
489
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
490
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
491
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
492 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
493 第四講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
494
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
495
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
496 1. Ctrl-g 用于顯示當前光標所在位置和文件狀態信息。Shift-G 用于將光標跳
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
497 轉至文件最後一行。先敲入一個行號然後按 Shift-G 則是將光標移動至該行
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
498 號代表的行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
499
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
500 2. 輸入 / 然後緊隨一個字符串是則是在當前所編輯的文檔中向後查找該字符串。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
501 輸入問號 ? 然後緊隨一個字符串是則是在當前所編輯的文檔中向前查找該字
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
502 符串。完成一次查找之後按 n 鍵則是重復上一次的命令,可在同一方向上查
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
503 找下一個字符串所在;或者按 Shift-N 向相反方向查找下該字符串所在。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
504
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
505 3. 如果光標當前位置是括號(、)、[、]、{、},按 % 可以將光標移動到配對的
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
506 括號上。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
507
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
508 4. 在一行內替換頭一個字符串 old 為新的字符串 new,請輸入 :s/old/new
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
509 在一行內替換所有的字符串 old 為新的字符串 new,請輸入 :s/old/new/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
510 在兩行內替換所有的字符串 old 為新的字符串 new,請輸入 :#,#s/old/new/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
511 在文件內替換所有的字符串 old 為新的字符串 new,請輸入 :%s/old/new/g
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
512 進行全文替換時詢問用戶確認每個替換需添加 c 選項,請輸入 :%s/old/new/gc
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
513
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
514
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
516 第五講第一節︰在 VIM 內執行外部命令的方法
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
517
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
518
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
519 ** 輸入 :! 然後緊隨著輸入一個外部命令可以執行該外部命令。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
520
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
521 1. 按下我們所熟悉的 : 命令設置光標到屏幕底部。這樣就可以讓您輸入命令了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
522
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
523 2. 接著輸入感嘆號 ! 這個字符,這樣就允許您執行外部的 shell 命令了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
524
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
525 3. 我們以 ls 命令為例。輸入 !ls <回車> 。該命令就會列舉出您當前目錄的
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
526 內容,就如同您在命令行提示符下輸入 ls 命令的結果一樣。如果 !ls 沒起
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
527 作用,您可以試試 :!dir 看看。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
528
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
529 ---> 提示︰ 所有的外部命令都可以以這種方式執行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
530
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
531 ---> 提示︰ 所有的 : 命令都必須以 <回車> 告終。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
532
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
533
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
534
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
535
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
536 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
537 第五講第二節︰關于保存文件的更多信息
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
538
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
539
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
540 ** 要將對文件的改動保存到文件中,請輸入 :w FILENAME **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
541
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
542 1. 輸入 :!dir 或者 :!ls 獲知當前目錄的內容。您應當已知道最後還得敲
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
543 <回車> 吧。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
544
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
545 2. 選擇一個尚未存在文件名,比如 TEST 。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
546
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
547 3. 接著輸入 :w TEST (此處 TEST 是您所選擇的文件名。)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
548
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
549 4. 該命令會以 TEST 為文件名保存整個文件 (VIM 教程)。為了確保正確保存,
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
550 請再次輸入 :!dir 查看您的目錄列表內容。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
551
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
552 ---> 請注意︰如果您退出 VIM 然後在以文件名 TEST 為參數進入,那麼該文件內
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
553 容應該同您保存時的文件內容是完全一樣的。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
554
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
555 5. 現在您可以通過輸入 :!rm TEST 來刪除 TEST 文件了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
556
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
557
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
558
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
559 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
560 第五講第三節︰一個具有選擇性的保存命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
561
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
562
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
563 ** 要保存文件的部分內容,請輸入 :#,# w FILENAME **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
564
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
565 1. 再來執行一次 :!dir 或者 :!ls 獲知當前目錄的內容,然後選擇一個合適的
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
566 不重名的文件名,比如 TEST 。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
567
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
568 2. 接著將光標移動至本頁的最頂端,然後按 CTRL-g 找到該行的行號。別忘了
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
569 行號哦。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
570
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
571 3. 接著把光標移動至本頁的最底端,再按一次 CTRL-g 。也別忘了這個行好哦。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
572
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
573 4. 為了只保存文章的某個部分,請輸入 :#,# w TEST 。這裡的 #,# 就是上面
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
574 要求您記住的行號(頂端行號,底端行號),而 TEST 就是選定的文件名。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
575
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
576 5. 最後,用 :!dir 確認文件是否正確保存。但是這次先別刪除掉。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
577
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
578
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
579
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
580
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
581 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
582 第五講第四節︰提取和合並文件
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
583
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
584
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
585 ** 要向當前文件中插入另外的文件的內容,請輸入 :r FILENAME **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
586
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
587 1. 請鍵入 :!dir 確認您前面創建的 TEST 文件還在。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
588
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
589 2. 然後將光標移動至當前頁面的頂端。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
590
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
591 特別提示︰ 執行步驟3之後您將看到第五講第三節,請屆時再往下移動回到這裡來。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
592
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
593 3. 接著通過 :r TEST 將前面創建的名為 TEST 的文件提取進來。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
594
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
595 特別提示︰您所提取進來的文件將從光標所在位置處開始置入。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
596
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
597 4. 為了確認文件已經提取成功,移動光標回到原來的位置就可以注意有兩份第
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
598 五講第三節,一份是原本,另外一份是來自文件的副本。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
599
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
600
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
601
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
602 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
603 第五講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
604
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
605
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
606 1. :!command 用于執行一個外部命令 command。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
607
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
608 請看一些實際例子︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
609 :!dir - 用于顯示當前目錄的內容。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
610 :!rm FILENAME - 用于刪除名為 FILENAME 的文件。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
611
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
612 2. :w FILENAME 可將當前 VIM 中正在編輯的文件保存到名為 FILENAME
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
613 的文件中。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
614
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
615 3. :#,#w FILENAME 可將當前編輯文件第 # 行至第 # 行的內容保存到文件
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
616 FILENAME 中。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
617
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
618 4. :r FILENAME 可提取磁盤文件 FILENAME 並將其插入到當前文件的光標位置
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
619 後面。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
620
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
621
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
622
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
623
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
624
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
625
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
626
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
627 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
628 第六講第一節︰打開類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
629
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
630
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
631 ** 輸入 o 將在光標的下方打開新的一行並進入插入模式。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
632
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
633 1. 請將光標移動到本節中下面標記有 ---> 的那一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
634
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
635 2. 接著輸入小寫的 o 在光標 *下方* 打開新的一行並進入插入模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
636
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
637 3. 然後復制標記有 ---> 的行並按 <ESC> 鍵退出插入模式而進入正常模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
638
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
639 ---> After typing o the cursor is placed on the open line in Insert mode.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
640
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
641 4. 為了在光標 *上方* 打開新的一行,只需要輸入大寫的 O 而不是小寫的 o
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
642 就可以了。請在下行測試一下吧。當光標處在在該行上時,按 Shift-O可以
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
643 在該行上方新開一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
644
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
645 Open up a line above this by typing Shift-O while the cursor is on this line.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
646
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
647
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
648
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
649
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
650
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
651 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
652 第六講第二節︰光標後插入類命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
653
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
654
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
655 ** 輸入 a 將可在光標之後插入文本。 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
656
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
657 1. 請在正常模式下通過輸入 $ 將光標移動到本節中下面標記有 ---> 的第一行
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
658 的末尾。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
659
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
660 2. 接著輸入小寫的 a 則可在光標之後插入文本了。大寫的 A 則可以直接在行
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
661 末插入文本。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
662
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
663 提示︰輸入大寫 A 的操作方法可以在行末插入文本,避免了輸入 i,光標定位到
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
664 最後一個字符,輸入的文本,<ESC> 回復正常模式,箭頭右鍵移動光標以及
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
665 x 刪除當前光標所在位置字符等等諸多繁雜的操作。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
666
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
667 3. 操作之後第一行就可以補充完整了。請注意光標後插入文本與插入模式是基
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
668 本完全一致的,只是文本插入的位置定位稍有不同罷了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
669
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
670 ---> This line will allow you to practice
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
671 ---> This line will allow you to practice appending text to the end of a line.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
672
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
673
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
674
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
675 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
676 第六講第三節︰另外一個置換類命令的版本
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
677
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
678
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
679 ** 輸入大寫的 R 可連續替換多個字符。**
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
680
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
681 1. 請將光標移動到本節中下面標記有 ---> 的第一行。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
682
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
683 2. 移動光標到第一行中不同于標有 ---> 的第二行的第一個單詞的開始,即單
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
684 詞 last 處。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
685
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
686 3. 然後輸入大寫的 R 開始把第一行中的不同于第二行的剩余字符逐一輸入,就
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
687 可以全部替換掉原有的字符而使得第一行完全雷同第二行了。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
688
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
689 ---> To make the first line the same as the last on this page use the keys.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
690 ---> To make the first line the same as the second, type R and the new text.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
691
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
692 4. 請注意︰如果您按 <ESC> 退出置換模式回復正常模式,尚未替換的文本將仍
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
693 然保持原狀。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
694
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
695
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
696
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
697
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
698
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
699 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
700 第六講第四節︰設置類命令的選項
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
701
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
702
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
703 ** 設置可使查找或者替換可忽略大小寫的選項 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
704
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
705
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
706 1. 要查找單詞 ignore 可在正常模式下輸入 /ignore 。要重復查找該詞,可以
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
707 重復按 n 鍵。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
708
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
709 2. 然後設置 ic 選項(ic就是英文忽略大小寫Ignore Case的首字母縮寫詞),即
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
710 輸入︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
711 :set ic
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
712
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
713 3. 現在可以通過鍵入 n 鍵再次查找單詞 ignore。重復查找可以重復鍵入 n 鍵。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
714
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
715 4. 然後設置 hlsearch 和 incsearch 這兩個選項,輸入以下內容︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
716 :set hls is
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
717
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
718 5. 現在可以再次輸入查找命令,看看會有什麼效果︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
719 /ignore
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
720
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
721 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
722 第六講小結
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
723
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
724
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
725 1. 輸入小寫的 o 可以在光標下方打開新的一行並將光標置于新開的行首,進入
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
726 插入模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
727 輸入大寫的 O 可以在光標上方打開新的一行並將光標置于新開的行首,進入
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
728 插入模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
729
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
730 2. 輸入小寫的 a 可以在光標所在位置之後插入文本。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
731 輸入大寫的 A 可以在光標所在行的行末之後插入文本。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
732
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
733 3. 輸入大寫的 R 將進入替換模式,直至按 <ESC> 鍵退出替換模式而進入正常
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
734 模式。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
735
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
736 4. 輸入 :set xxx 可以設置 xxx 選項。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
737
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
738
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
739
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
740
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
741
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
742
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
743
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
744
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
745
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
746 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
747 第七講︰在線幫助命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
748
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
749 ** 使用在線幫助系統 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
750
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
751 Vim 擁有一個細致全面的在線幫助系統。要啟動該幫助系統,請選擇如下三種方
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
752 法之一︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
753 - 按下 <HELP> 鍵 (如果鍵盤上有的話)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
754 - 按下 <F1> 鍵 (如果鍵盤上有的話)
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
755 - 輸入 :help <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
756
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
757 輸入 :q <回車> 可以關閉幫助窗口。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
758
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
759 提供一個正確的參數給":help"命令,您可以找到關于該主題的幫助。請試驗以
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
760 下參數(可別忘了按回車鍵哦。:)︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
761
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
762 :help w <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
763 :help c_<T <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
764 :help insert-index <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
765 :help user-manual <回車>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
766
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
767
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
768
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
769
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
770 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
771 第八講︰創建一個啟動腳本
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
772
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
773 ** 啟用vim的功能 **
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
774
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
775 Vim的功能特性要比vi多得多,但大部分功能都沒有缺省激活。為了啟動更多的
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
776 功能,您得創建一個vimrc文件。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
777
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
778 1. 開始編輯vimrc文件,這取決于您所使用的操作系統︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
779
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
780 :edit ~/.vimrc 這是Unix系統所使用的命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
781 :edit $VIM/_vimrc 這是Windows系統所使用的命令
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
782
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
783 2. 接著導入vimrc范例文件︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
784
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
785 :read $VIMRUNTIME/vimrc_example.vim
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
786
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
787 3. 保存文件,命令為︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
788
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
789 :write
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
790
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
791 在下次您啟動vim的時候,編輯器就會有了語法高亮的功能。您可以繼續把您喜
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
792 歡的其它功能設置添加到這個vimrc文件中。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
793
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
794 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
795
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
796 vim 教程到此結束。本教程只是為了簡明地介紹一下vim編輯器,但已足以讓您
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
797 很容易學會使用本編輯器了。毋庸質疑,vim還有很多很多的命令,本教程所介
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
798 紹的還差得遠著呢。所以您要精通的話,還望繼續努力哦。下一步您可以閱讀
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
799 vim手冊,使用的命令是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
800 :help user-manual
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
801
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
802 為了更進一步的參考和學習,以下這本書值得推薦︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
803
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
804 Vim - Vi Improved - 作者︰Steve Oualline
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
805 出版社︰New Riders
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
806
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
807 這是第一本完全講解vim的書籍。對于初學者特別有用。其中還包含有大量實例
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
808 和圖示。欲知詳情,請訪問 http://iccf-holland.org/click5.html
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
809
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
810 以下這本書比較老了而且內容主要是vi而不是vim,但是也值得推薦︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
811
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
812 Learning the Vi Editor - 作者︰Linda Lamb
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
813 出版社︰O'Reilly & Associates Inc.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
814
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
815 這是一本不錯的書,通過它您幾乎能夠了解到全部vi能夠做到的事情。此書的第
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
816 六個版本也包含了一些關于vim的信息。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
817
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
818 本教程是由來自Calorado School of Minese的Michael C. Pierce、Robert K.
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
819 Ware 所編寫的,其中來自Colorado State University的Charles Smith提供了
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
820 很多創意。編者通信地址是︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
821
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
822 bware@mines.colorado.edu
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
823
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
824 本教程已由Bram Moolenaar專為vim進行修訂。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
825
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
826
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
827
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
828 譯制者附言︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
829 ===========
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
830 簡體中文教程翻譯版之譯制者為梁昌泰 <beos@turbolinux.com.cn>,還有
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
831 另外一個聯系地址︰linuxrat@gnuchina.org。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
832
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
833 繁體中文教程是從簡體中文教程翻譯版使用 Debian GNU/Linux 中文項目小
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
834 組的于廣輝先生編寫的中文漢字轉碼器 autoconvert 轉換而成的,並對轉
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
835 換的結果做了一些細節的改動。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
836
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
837 變更記錄︰
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
838 =========
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
839 2002年08月30日 梁昌泰 <beos@turbolinux.com.cn>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
840 感謝 RMS@SMTH 的指正,將多處錯誤修正。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
841
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
842 2002年04月22日 梁昌泰 <linuxrat@gnuchina.org>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
843 感謝 xuandong@sh163.net 的指正,將兩處錯別字修正。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
844
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
845 2002年03月18日 梁昌泰 <linuxrat@gnuchina.org>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
846 根據Bram Molenaar先生在2002年03月16日的來信要求,將vimtutor1.4中譯
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
847 版升級到vimtutor1.5。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
848
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
849 2001年11月15日 梁昌泰 <linuxrat@gnuchina.org>
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
850 將vimtutor1.4中譯版提交給Bram Molenaar和Sven Guckes。
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
851
18ee39301b82 updated for version 7.2a
vimboss
parents:
diff changeset
852 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~