background preloader

Vi

Facebook Twitter

VIM: help. VIM: usr_toc. Download. Vim is available for many different systems and there are several versions. This page will help you decide what to download. The most popular: Details and options for: Versions before 7.3 can also be obtained with Subversion and CVS. Vim 7.4 is the latest stable version. To avoid having to update this page for every new version, there are links to the directories. The best way to install Vim on Unix is to use the sources. You need to download at the sources and the runtime files. Using Mercurial This is the simplest and most efficient way to obtain the latest version, including all patches.

Summary: hg clone vim cd vim/src make Using Aap Aap is a new tool that does all the work of downloading and patching for you. The detailed explanation can be found here. Version 7.x There is one big file to download that contains almost everything. Version 6.x You have a choice: Either get the one big archive OR get four smaller ones (that each fit on a floppy disk). Version 5.x. Vi指令說明(完整版) Vi指令說明(完整版) .vi 的操作模式 ============== vi 提供兩種操作模式:輸入模式(insert mode)和指令模式(command mode) 。 當使用者進入 vi 後,即處在指令模式下,此刻鍵入之任何字元皆被視為 指令。 在此模式下可進行刪除、修改等動作。 若要輸入資料,則需進入輸入 模式。 .輸入模式 ========= 如何進入輸入模式 a (append) 由游標之後加入資料。 A 由該行之末加入資料。 I (insert) 由游標之前加入資料。 如何離開輸入模式 《ESC》 結束輸入模式。 .指令模式 ========= 游標之移動 h 向左移一個字元。 註一:句子(sentence)在vi中是指以『!』 .視窗的移動 =========== <Ctrl><f> 視窗往下捲一頁。 .刪除、複製及修改指令介紹 (此單元較少使用) ========================= d(delete)、c(change)和y(yank)這一類的指令在 vi 中的指令格式為: Operator + Scope = command (運算子) (範圍) 運算子: d 刪除指令。

範圍: e 由游標所在位置至該字串的最後一個字元。 整行動作 dd 刪除整行。 .刪除與修改 =========== x 刪除游標所在該字元。 .搬移與複製 ========== 利用 delete 及 put 指令可完成資料搬移之目的。 .指令重複 ========= 在指令模式中,可在指令前面加入一數字 n,則此指令動作會重複執行 n 次。 .取消前一動作(Undo) =================== 即復原執行上一指令前的內容。 U 恢復最後一個指令之前的結果。 .搜尋 ===== 在vi中可搜尋某一字串,使游標移至該處。 /字串 往游標之後尋找該字串。 .資料的連接 =========== J 句子的連接。 若某行資料太長亦可將其分成兩行,只要將游標移至分開點,進入輸入模式 (可利用 a、i等指令)再按《Enter》即可。 .環境的設定 =========== :set nu 設定資料的行號。 .ex指令 ======= 讀寫資料 :w 將緩衝區的資料寫入磁碟中。

刪除、複製及搬移 :10,20d 刪除第10行至第20行的資料。 Vi命令一览表 - powered by phpArticle 3.0 beta 1.