索引

Nvim :help 頁面,使用 tree-sitter-vimdoc 解析器,從 原始碼 產生


這個檔案包含每個模式的所有指令清單,附帶標籤和簡短描述。清單依 ASCII 值排序。
提示:當尋找特定功能時,請使用搜尋指令。例如,要尋找刪除某些內容,請使用:"/delete"。
選項概觀請參閱 option-list。內建函式概觀請參閱 functions。Vim 變數清單請參閱 vim-variable

1. 插入模式 insert-index

標籤 字元 插入模式中的動作
------------------------------------------------------------------------------
i_CTRL-@ CTRL-@ 插入先前插入的文字並停止插入 i_CTRL-A CTRL-A 插入先前插入的文字 i_CTRL-C CTRL-C 退出插入模式,不檢查縮寫 i_CTRL-D CTRL-D 刪除目前行的一個 shiftwidth 縮排 i_CTRL-E CTRL-E 插入游標下方的字元 CTRL-F 未使用(但預設在 'cinkeys' 中重新縮排目前行)i_CTRL-G_j CTRL-G CTRL-J 向下移動一行,到開始插入的欄位 i_CTRL-G_j CTRL-G j 向下移動一行,到開始插入的欄位 i_CTRL-G_j CTRL-G <Down> 向下移動一行,到開始插入的欄位 i_CTRL-G_k CTRL-G CTRL-K 向上移動一行,到開始插入的欄位 i_CTRL-G_k CTRL-G k 向上移動一行,到開始插入的欄位 i_CTRL-G_k CTRL-G <Up> 向上移動一行,到開始插入的欄位 i_CTRL-G_u CTRL-G u 開始新的可復原編輯 i_CTRL-G_U CTRL-G U 不會因為下一次游標移動而中斷復原 i_<BS> <BS> 刪除游標之前的字元 i_digraph {char1}<BS>{char2} 輸入二合字母(僅當設定 'digraph' 選項時) i_CTRL-H CTRL-H<BS> 相同 i_<Tab> <Tab> 插入一個 <Tab> 字元 i_CTRL-I CTRL-I<Tab> 相同 i_<NL> <NL><CR> 相同 i_CTRL-J CTRL-J<CR> 相同 i_CTRL-K CTRL-K {char1} {char2} 輸入二合字母 i_<CR> <CR> 開始新行 i_CTRL-M CTRL-M<CR> 相同 i_CTRL-N CTRL-N 在游標前尋找下一個關鍵字比對 i_CTRL-O CTRL-O 執行單一指令並返回插入模式 i_CTRL-P CTRL-P 在游標前尋找上一個關鍵字比對 i_CTRL-Q CTRL-QCTRL-V 相同,除非用於終端機控制流 i_CTRL-SHIFT-Q CTRL-SHIFT-Q {char} 類似於 CTRL-Q,除非 tui-modifyOtherKeys 啟用 i_CTRL-R CTRL-R {register} 插入暫存器的內容 i_CTRL-R_CTRL-R CTRL-R CTRL-R {register} 逐字插入暫存器的內容 i_CTRL-R_CTRL-O CTRL-R CTRL-O {register} 逐字插入暫存器的內容且不自動縮排 i_CTRL-R_CTRL-P CTRL-R CTRL-P {register} 逐字插入暫存器的內容並修正縮排。CTRL-S 未使用或用於終端機控制流 i_CTRL-T CTRL-T 在目前行插入一個 shiftwidth 縮排 i_CTRL-U CTRL-U 刪除目前行中輸入的所有字元 i_CTRL-V CTRL-V {char} 逐字插入下一個非數字 i_CTRL-SHIFT-V CTRL-SHIFT-V {char} 類似於 CTRL-V,除非 tui-modifyOtherKeys 啟用 i_CTRL-V_digit CTRL-V {number} 將三位數十進位數字插入為單一位元組。 i_CTRL-W CTRL-W 刪除游標之前的單字 i_CTRL-X CTRL-X {mode} 進入 CTRL-X 子模式,請參閱 i_CTRL-X_index i_CTRL-Y CTRL-Y 插入游標上方的字元 i_<Esc> <Esc> 結束插入模式 i_CTRL-[ CTRL-[<Esc> 相同 i_CTRL-\_CTRL-N CTRL-\ CTRL-N 進入一般模式 i_CTRL-\_CTRL-G CTRL-\ CTRL-G 進入一般模式 CTRL-\ a - z 保留給擴充功能 CTRL-\ 其他未使用 i_CTRL-] CTRL-] 觸發縮寫 i_CTRL-^ CTRL-^ 切換使用 :lmap 對應 i_CTRL-_ CTRL-_'allowrevins' 設定時:切換 'revins'
<Space> 到 '~' 未使用,除了 '0' 和 '^' 後接 CTRL-D
i_0_CTRL-D 0 CTRL-D 刪除目前行中的所有縮排 i_^_CTRL-D ^ CTRL-D 刪除目前行中的所有縮排,在下一行還原縮排
i_<Del> <Del> 刪除游標下的字元
Meta 字元(0x80 到 0xff,128 到 255)未使用
i_<Left> <Left> 游標向左移動一個字元 i_<S-Left> <S-Left> 游標向左移動一個單字 i_<C-Left> <C-Left> 游標向左移動一個單字 i_<Right> <Right> 游標向右移動一個字元 i_<S-Right> <S-Right> 游標向右移動一個單字 i_<C-Right> <C-Right> 游標向右移動一個單字 i_<Up> <Up> 游標向上移動一行 i_<S-Up> <S-Up><PageUp> 相同 i_<Down> <Down> 游標向下移動一行 i_<S-Down> <S-Down><PageDown> 相同 i_<Home> <Home> 游標移動到行首 i_<C-Home> <C-Home> 游標移動到檔案開頭 i_<End> <End> 游標移動到行尾之後 i_<C-End> <C-End> 游標移動到檔案結尾之後 i_<PageUp> <PageUp> 向後移動一整個畫面 i_<PageDown> <PageDown> 向前移動一整個畫面 i_<F1> <F1><Help> 相同 i_<Help> <Help> 停止插入模式並顯示說明視窗 i_<Insert> <Insert> 切換插入/取代模式 i_<LeftMouse> <LeftMouse> 游標移動到滑鼠點擊位置 i_<ScrollWheelDown> <ScrollWheelDown> 向下移動視窗三行 i_<S-ScrollWheelDown> <S-ScrollWheelDown> 向下移動視窗一頁 i_<ScrollWheelUp> <ScrollWheelUp> 向上移動視窗三行 i_<S-ScrollWheelUp> <S-ScrollWheelUp> 向上移動視窗一頁 i_<ScrollWheelLeft> <ScrollWheelLeft> 向左移動視窗六個欄位 i_<S-ScrollWheelLeft> <S-ScrollWheelLeft> 向左移動視窗一頁 i_<ScrollWheelRight> <ScrollWheelRight> 向右移動視窗六個欄位 i_<S-ScrollWheelRight> <S-ScrollWheelRight> 向右移動視窗一頁
CTRL-X 子模式中的指令 i_CTRL-X_index
i_CTRL-X_CTRL-D CTRL-X CTRL-D 完成定義的識別符號 i_CTRL-X_CTRL-E CTRL-X CTRL-E 向上滾動 i_CTRL-X_CTRL-F CTRL-X CTRL-F 完成檔案名稱 i_CTRL-X_CTRL-I CTRL-X CTRL-I 完成識別符號 i_CTRL-X_CTRL-K CTRL-X CTRL-K 從字典完成識別符號 i_CTRL-X_CTRL-L CTRL-X CTRL-L 完成整行 i_CTRL-X_CTRL-N CTRL-X CTRL-N 下一個完成 i_CTRL-X_CTRL-O CTRL-X CTRL-O 全方位完成 i_CTRL-X_CTRL-P CTRL-X CTRL-P 上一個完成 i_CTRL-X_CTRL-S CTRL-X CTRL-S 拼寫建議 i_CTRL-X_CTRL-T CTRL-X CTRL-T 從辭典完成識別符號 i_CTRL-X_CTRL-Y CTRL-X CTRL-Y 向下滾動 i_CTRL-X_CTRL-U CTRL-X CTRL-U 使用 'completefunc' 完成 i_CTRL-X_CTRL-V CTRL-X CTRL-V 像在 : 命令列中完成 i_CTRL-X_CTRL-Z CTRL-X CTRL-Z 停止完成,保持文字原樣 i_CTRL-X_CTRL-] CTRL-X CTRL-] 完成標籤 i_CTRL-X_s CTRL-X s 拼寫建議
完成模式中的指令(請參閱 popupmenu-keys
complete_CTRL-E CTRL-E 停止完成並返回原始文字 complete_CTRL-Y CTRL-Y 接受選定的比對並停止完成 CTRL-L 從目前比對插入一個字元 <CR> 插入目前選定的比對 <BS> 刪除一個字元並重做搜尋 CTRL-H<BS> 相同 <Up> 選取上一個比對 <Down> 選取下一個比對 <PageUp> 選取數個條目之前的比對 <PageDown> 選取數個條目之後的比對,其他則停止完成並插入輸入的字元

2. 一般模式 normal-index

CHAR 任何非空白字元 WORD 一系列非空白字元 N 在指令前輸入的數字 {motion} 游標移動指令 Nmove 移動的文字帶有 {motion} SECTION 可能以 '}' 而不是 '{' 開頭的區段
注意:1 = 游標移動指令;2 = 可以復原/重做
標籤 字元 注意 一般模式中的動作
------------------------------------------------------------------------------
CTRL-@ 未使用 CTRL-A CTRL-A 2 將游標所在或之後的數字加上 N CTRL-B CTRL-B 1 向後捲動 N 個畫面 CTRL-C CTRL-C 中斷目前(搜尋)指令 CTRL-D CTRL-D 向下捲動 N 行(預設:半個畫面) CTRL-E CTRL-E 向上捲動 N 行(額外 N 行) CTRL-F CTRL-F 1 向前捲動 N 個畫面 CTRL-G CTRL-G 顯示目前檔案名稱和位置 <BS> <BS> 1 與 "h" 相同 CTRL-H CTRL-H 1 與 "h" 相同 <Tab> <Tab> 1 跳至跳躍列表中較新的第 N 個條目 CTRL-I CTRL-I 1 與 <Tab> 相同 <NL> <NL> 1 與 "j" 相同 <S-NL> <S-NL> 1 與 CTRL-F 相同 CTRL-J CTRL-J 1 與 "j" 相同 CTRL-K 未使用 CTRL-L CTRL-L 重新繪製畫面 <CR> <CR> 1 將游標移至下方第 N 行的第一個字元 <S-CR> <S-CR> 1 與 CTRL-F 相同 CTRL-M CTRL-M 1 與 <CR> 相同 CTRL-N CTRL-N 1 與 "j" 相同 CTRL-O CTRL-O 1 跳至跳躍列表中較舊的第 N 個條目 CTRL-P CTRL-P 1 與 "k" 相同 CTRL-Q 未使用,或用於終端機控制流程 CTRL-R CTRL-R 2 重複使用 'u' 取消的變更 CTRL-S 未使用,或用於終端機控制流程 CTRL-T CTRL-T 跳至標籤列表中較舊的第 N 個標籤 CTRL-U CTRL-U 向上捲動 N 行(預設:半個畫面) CTRL-V CTRL-V 開始區塊式視覺模式 CTRL-W CTRL-W {char} 視窗指令,請參閱 CTRL-W CTRL-X CTRL-X 2 將游標所在或之後的數字減去 N CTRL-Y CTRL-Y 向下捲動 N 行 CTRL-Z CTRL-Z 暫停程式(或啟動新的 shell) CTRL-[ <Esc> 未使用 CTRL-\_CTRL-N CTRL-\ CTRL-N 切換至一般模式(無操作) CTRL-\_CTRL-G CTRL-\ CTRL-G 切換至一般模式(無操作) CTRL-\ a - z 保留給擴充功能使用 CTRL-\ 其他未被使用 CTRL-] CTRL-] :ta 至游標下的識別字 CTRL-^ CTRL-^ 編輯第 N 個替代檔案(相當於 ":e #N") CTRL-<Tab> CTRL-<Tab> 與 g<Tab> 相同:跳至最後存取的標籤頁面 CTRL-_ 未使用
<Space> <Space> 1 same as "l" ! !{motion}{filter} 2 filter Nmove text through the {filter} command !! !!{filter} 2 filter N lines through the {filter} command quote "{register} use {register} for next delete, yank or put ({.%#:} only work with put) # # 1 search backward for the Nth occurrence of the ident under the cursor $ $ 1 cursor to the end of Nth next line % % 1 find the next (curly/square) bracket on this line and go to its match, or go to matching comment bracket, or go to matching preprocessor directive. N% {count}% 1 go to N percentage in the file & & 2 repeat last :s ' '{a-zA-Z0-9} 1 cursor to the first CHAR on the line with mark {a-zA-Z0-9} '' '' 1 cursor to the first CHAR of the line where the cursor was before the latest jump. '( '( 1 cursor to the first CHAR on the line of the start of the current sentence ') ') 1 cursor to the first CHAR on the line of the end of the current sentence '< '< 1 cursor to the first CHAR of the line where highlighted area starts/started in the current buffer. '> '> 1 cursor to the first CHAR of the line where highlighted area ends/ended in the current buffer. '[ '[ 1 cursor to the first CHAR on the line of the start of last operated text or start of put text '] '] 1 cursor to the first CHAR on the line of the end of last operated text or end of put text '{ '{ 1 cursor to the first CHAR on the line of the start of the current paragraph '} '} 1 cursor to the first CHAR on the line of the end of the current paragraph ( ( 1 cursor N sentences backward ) ) 1 cursor N sentences forward star * 1 search forward for the Nth occurrence of the ident under the cursor + + 1 same as <CR> <S-Plus> <S-+> 1 same as CTRL-F , , 1 repeat latest f, t, F or T in opposite direction N times - - 1 cursor to the first CHAR N lines higher <S-Minus> <S--> 1 same as CTRL-B . . 2 repeat last change with count replaced with N / /{pattern}<CR> 1 search forward for the Nth occurrence of {pattern} /<CR> /<CR> 1 search forward for {pattern} of last search 0 0 1 cursor to the first char of the line count 1 prepend to command to give a count count 2 " count 3 " count 4 " count 5 " count 6 " count 7 " count 8 " count 9 " : : 1 start entering an Ex command N: {count}: start entering an Ex command with range from current line to N-1 lines down ; ; 1 repeat latest f, t, F or T N times < <{motion} 2 shift Nmove lines one 'shiftwidth' leftwards << << 2 shift N lines one 'shiftwidth' leftwards = ={motion} 2 filter Nmove lines through "indent" == == 2 filter N lines through "indent" > >{motion} 2 shift Nmove lines one 'shiftwidth' rightwards >> >> 2 shift N lines one 'shiftwidth' rightwards ? ?{pattern}<CR> 1 search backward for the Nth previous occurrence of {pattern} ?<CR> ?<CR> 1 search backward for {pattern} of last search @ @{a-z} 2 execute the contents of register {a-z} N times @: @: repeat the previous ":" command N times @@ @@ 2 repeat the previous @{a-z} N times A A 2 append text after the end of the line N times B B 1 cursor N WORDS backward C ["x]C 2 change from the cursor position to the end of the line, and N-1 more lines [into register x]; synonym for "c$" D ["x]D 2 delete the characters under the cursor until the end of the line and N-1 more lines [into register x]; synonym for "d$" E E 1 cursor forward to the end of WORD N F F{char} 1 cursor to the Nth occurrence of {char} to the left G G 1 cursor to line N, default last line H H 1 cursor to line N from top of screen I I 2 insert text before the first CHAR on the line N times J J 2 Join N lines; default is 2 K K lookup Keyword under the cursor with 'keywordprg' L L 1 cursor to line N from bottom of screen M M 1 cursor to middle line of screen N N 1 repeat the latest '/' or '?' N times in opposite direction O O 2 begin a new line above the cursor and insert text, repeat N times P ["x]P 2 put the text [from register x] before the cursor N times R R 2 enter replace mode: overtype existing characters, repeat the entered text N-1 times S ["x]S 2 delete N lines [into register x] and start insert; synonym for "cc". T T{char} 1 cursor till after Nth occurrence of {char} to the left U U 2 undo all latest changes on one line V V start linewise Visual mode W W 1 cursor N WORDS forward X ["x]X 2 delete N characters before the cursor [into register x] Y ["x]Y yank N lines [into register x]; synonym for "yy" Note: Mapped to "y$" by default. default-mappings ZZ ZZ write if buffer changed and close window ZQ ZQ close window without writing [ [{char} square bracket command (see [ below) \ not used ] ]{char} square bracket command (see ] below) ^ ^ 1 cursor to the first CHAR of the line _ _ 1 cursor to the first CHAR N - 1 lines lower ` {a-zA-Z0-9} 1 cursor to the mark {a-zA-Z0-9} `( ( 1 cursor to the start of the current sentence `) ) 1 cursor to the end of the current sentence `< < 1 cursor to the start of the highlighted area `> > 1 cursor to the end of the highlighted area `[ [ 1 cursor to the start of last operated text or start of putted text `] ] 1 cursor to the end of last operated text or end of putted text `` "``" 1 cursor to the position before latest jump `{ { 1 cursor to the start of the current paragraph `} } 1 cursor to the end of the current paragraph a a 2 append text after the cursor N times b b 1 cursor N words backward c ["x]c{motion} 2 delete Nmove text [into register x] and start insert cc ["x]cc 2 delete N lines [into register x] and start insert d ["x]d{motion} 2 delete Nmove text [into register x] dd ["x]dd 2 delete N lines [into register x] do do 2 same as ":diffget" dp dp 2 same as ":diffput" e e 1 cursor forward to the end of word N f f{char} 1 cursor to Nth occurrence of {char} to the right g g{char} extended commands, see g below h h 1 cursor N chars to the left i i 2 insert text before the cursor N times j j 1 cursor N lines downward k k 1 cursor N lines upward l l 1 cursor N chars to the right m m{A-Za-z} set mark {A-Za-z} at cursor position n n 1 repeat the latest '/' or '?' N times o o 2 begin a new line below the cursor and insert text, repeat N times p ["x]p 2 put the text [from register x] after the cursor N times q q{0-9a-zA-Z"} record typed characters into named register {0-9a-zA-Z"} (uppercase to append) q q (while recording) stops recording Q Q 2 replay last recorded register q: q: edit : command-line in command-line window q/ q/ edit / command-line in command-line window q? q? edit ? command-line in command-line window r r{char} 2 replace N chars with {char} s ["x]s 2 (substitute) delete N characters [into register x] and start insert t t{char} 1 cursor till before Nth occurrence of {char} to the right u u 2 undo changes v v start charwise Visual mode w w 1 cursor N words forward x ["x]x 2 delete N characters under and after the cursor [into register x] y ["x]y{motion} yank Nmove text [into register x] yy ["x]yy yank N lines [into register x] z z{char} commands starting with 'z', see z below { { 1 cursor N paragraphs backward bar | 1 cursor to column N } } 1 cursor N paragraphs forward ~ ~ 2 'tildeop' off: switch case of N characters under cursor and move the cursor N characters to the right ~ ~{motion} 'tildeop' on: switch case of Nmove text <C-End> <C-End> 1 same as "G" <C-Home> <C-Home> 1 same as "gg" <C-Left> <C-Left> 1 same as "b" <C-LeftMouse> <C-LeftMouse> ":ta" to the keyword at the mouse click <C-Right> <C-Right> 1 same as "w" <C-RightMouse> <C-RightMouse> same as "CTRL-T" <C-Tab> <C-Tab> same as "g<Tab>" <Del> ["x]<Del> 2 same as "x" N<Del> {count}<Del> remove the last digit from {count} <Down> <Down> 1 same as "j" <End> <End> 1 same as "$" <F1> <F1> same as <Help> <Help> <Help> open a help window <Home> <Home> 1 same as "0" <Insert> <Insert> 2 same as "i" <Left> <Left> 1 same as "h" <LeftMouse> <LeftMouse> 1 move cursor to the mouse click position <MiddleMouse> <MiddleMouse> 2 same as "gP" at the mouse click position <PageDown> <PageDown> same as CTRL-F <PageUp> <PageUp> same as CTRL-B <Right> <Right> 1 same as "l" <RightMouse> <RightMouse> start Visual mode, move cursor to the mouse click position <S-Down> <S-Down> 1 same as CTRL-F <S-Left> <S-Left> 1 same as "b" <S-LeftMouse> <S-LeftMouse> same as "*" at the mouse click position <S-Right> <S-Right> 1 same as "w" <S-RightMouse> <S-RightMouse> same as "#" at the mouse click position <S-Up> <S-Up> 1 same as CTRL-B <Undo> <Undo> 2 same as "u" <Up> <Up> 1 same as "k" <ScrollWheelDown> <ScrollWheelDown> move window three lines down <S-ScrollWheelDown> <S-ScrollWheelDown> move window one page down <ScrollWheelUp> <ScrollWheelUp> move window three lines up <S-ScrollWheelUp> <S-ScrollWheelUp> move window one page up <ScrollWheelLeft> <ScrollWheelLeft> move window six columns left <S-ScrollWheelLeft> <S-ScrollWheelLeft> move window one page left <ScrollWheelRight> <ScrollWheelRight> move window six columns right <S-ScrollWheelRight> <S-ScrollWheelRight> move window one page right

2.1 文字物件 objects

這些可用於運算子之後或在視覺模式中選取物件。
標籤 指令 在運算元待處理和視覺模式中的動作
------------------------------------------------------------------------------
v_aquote a" 雙引號字串 v_a' a' 單引號字串 v_a( a( 與 ab 相同 v_a) a) 與 ab 相同 v_a< a< "a <>" 從 '<' 到配對的 '>' v_a> a> 與 a< 相同 v_aB aB "a 區塊" 從 [{]}(包含括號) v_aW aW "a WORD"(包含空格) v_a[ a[ "a []" 從 '[' 到配對的 ']' v_a] a] 與 a[ 相同 v_a` a` 反引號字串 v_ab ab "a 區塊" 從 "[(" 到 "])"(包含大括號) v_ap ap "a 段落"(包含空格) v_as as "a 句子"(包含空格) v_at at "a 標籤區塊"(包含空格) v_aw aw "a 單字"(包含空格) v_a{ a{ 與 aB 相同 v_a} a} 與 aB 相同 v_iquote i" 雙引號字串,不含引號 v_i' i' 單引號字串,不含引號 v_i( i( 與 ib 相同 v_i) i) 與 ib 相同 v_i< i< "內部 <>" 從 '<' 到配對的 '>' v_i> i> 與 i< 相同 v_iB iB "內部區塊" 從 [{]} v_iW iW "內部 WORD" v_i[ i[ "內部 []" 從 '[' 到配對的 ']' v_i] i] 與 i[ 相同 v_i` i` 反引號字串,不含反引號 v_ib ib "內部區塊" 從 "[(" 到 "])" v_ip ip "內部段落" v_is is "內部句子" v_it it "內部標籤區塊" v_iw iw "內部單字" v_i{ i{ 與 iB 相同 v_i} i} 與 iB 相同

2.2 視窗指令 CTRL-W

標籤 指令 在一般模式中的動作
------------------------------------------------------------------------------
CTRL-W_CTRL-B CTRL-W CTRL-B 等同於 "CTRL-W b" CTRL-W_CTRL-C CTRL-W CTRL-C 等同於 "CTRL-W c" CTRL-W_CTRL-D CTRL-W CTRL-D 等同於 "CTRL-W d" CTRL-W_CTRL-F CTRL-W CTRL-F 等同於 "CTRL-W f" CTRL-W CTRL-G 等同於 "CTRL-W g .." CTRL-W_CTRL-H CTRL-W CTRL-H 等同於 "CTRL-W h" CTRL-W_CTRL-I CTRL-W CTRL-I 等同於 "CTRL-W i" CTRL-W_CTRL-J CTRL-W CTRL-J 等同於 "CTRL-W j" CTRL-W_CTRL-K CTRL-W CTRL-K 等同於 "CTRL-W k" CTRL-W_CTRL-L CTRL-W CTRL-L 等同於 "CTRL-W l" CTRL-W_CTRL-N CTRL-W CTRL-N 等同於 "CTRL-W n" CTRL-W_CTRL-O CTRL-W CTRL-O 等同於 "CTRL-W o" CTRL-W_CTRL-P CTRL-W CTRL-P 等同於 "CTRL-W p" CTRL-W_CTRL-Q CTRL-W CTRL-Q 等同於 "CTRL-W q" CTRL-W_CTRL-R CTRL-W CTRL-R 等同於 "CTRL-W r" CTRL-W_CTRL-S CTRL-W CTRL-S 等同於 "CTRL-W s" CTRL-W_CTRL-T CTRL-W CTRL-T 等同於 "CTRL-W t" CTRL-W_CTRL-V CTRL-W CTRL-V 等同於 "CTRL-W v" CTRL-W_CTRL-W CTRL-W CTRL-W 等同於 "CTRL-W w" CTRL-W_CTRL-X CTRL-W CTRL-X 等同於 "CTRL-W x" CTRL-W_CTRL-Z CTRL-W CTRL-Z 等同於 "CTRL-W z" CTRL-W_CTRL-] CTRL-W CTRL-] 等同於 "CTRL-W ]" CTRL-W_CTRL-^ CTRL-W CTRL-^ 等同於 "CTRL-W ^" CTRL-W_CTRL-_ CTRL-W CTRL-_ 等同於 "CTRL-W _" CTRL-W_+ CTRL-W + 增加當前視窗高度 N 行 CTRL-W_- CTRL-W - 減少當前視窗高度 N 行 CTRL-W_< CTRL-W < 減少當前視窗寬度 N 欄 CTRL-W_= CTRL-W = 使所有視窗高度和寬度相同 CTRL-W_> CTRL-W > 增加當前視窗寬度 N 欄 CTRL-W_H CTRL-W H 將當前視窗移動到最左邊 CTRL-W_J CTRL-W J 將當前視窗移動到最底部 CTRL-W_K CTRL-W K 將當前視窗移動到最頂部 CTRL-W_L CTRL-W L 將當前視窗移動到最右邊 CTRL-W_P CTRL-W P 前往預覽視窗 CTRL-W_R CTRL-W R 向上旋轉視窗 N 次 CTRL-W_S CTRL-W S 等同於 "CTRL-W s" CTRL-W_T CTRL-W T 將當前視窗移動到新的標籤頁 CTRL-W_W CTRL-W W 前往 N 個上一個視窗 (環繞) CTRL-W_] CTRL-W ] 分割視窗並跳轉到游標下的標籤 CTRL-W_^ CTRL-W ^ 分割當前視窗並編輯備用檔案 N CTRL-W__ CTRL-W _ 將當前視窗高度設定為 N (預設值: 非常高) CTRL-W_b CTRL-W b 前往底部視窗 CTRL-W_c CTRL-W c 關閉當前視窗 (如同 :close) CTRL-W_d CTRL-W d 分割視窗並跳轉到游標下的定義 CTRL-W_f CTRL-W f 分割視窗並編輯游標下的檔案名稱 CTRL-W_F CTRL-W F 分割視窗並編輯游標下的檔案名稱,並跳轉到檔案名稱後面的行號 CTRL-W_g_CTRL-] CTRL-W g CTRL-] 分割視窗並執行 :tjump 到游標下的標籤 CTRL-W_g] CTRL-W g ] 分割視窗並對游標下的標籤執行 :tselect CTRL-W_g} CTRL-W g } 對游標下的標籤執行 :ptjump CTRL-W_gf CTRL-W g f 在新的標籤頁中編輯游標下的檔案名稱 CTRL-W_gF CTRL-W g F 在新的標籤頁中編輯游標下的檔案名稱,並跳轉到檔案名稱後面的行號 CTRL-W_gt CTRL-W g t 等同於 gt: 前往下一個標籤頁 CTRL-W_gT CTRL-W g T 等同於 gT: 前往上一個標籤頁 CTRL-W_g<Tab> CTRL-W g <Tab> 等同於 g<Tab>: 前往上次存取的標籤頁 CTRL-W_h CTRL-W h 前往第 N 個左側視窗 (停在第一個視窗) CTRL-W_i CTRL-W i 分割視窗並跳轉到游標下識別符的宣告 CTRL-W_j CTRL-W j 向下移動 N 個視窗 (停在最後一個視窗) CTRL-W_k CTRL-W k 向上移動 N 個視窗 (停在第一個視窗) CTRL-W_l CTRL-W l 前往第 N 個右側視窗 (停在最後一個視窗) CTRL-W_n CTRL-W n 開啟新的視窗,高度為 N 行 CTRL-W_o CTRL-W o 關閉除當前視窗之外的所有視窗 (如同 :only) CTRL-W_p CTRL-W p 前往上一個 (上次存取) 視窗 CTRL-W_q CTRL-W q 關閉當前視窗 (如同 :quit) CTRL-W_r CTRL-W r 向下旋轉視窗 N 次 CTRL-W_s CTRL-W s 將當前視窗分割成兩個部分,新的視窗高度為 N 行 CTRL-W_t CTRL-W t 前往頂部視窗 CTRL-W_v CTRL-W v 垂直分割當前視窗,新的視窗寬度為 N 欄 CTRL-W_w CTRL-W w 前往 N 個下一個視窗 (環繞) CTRL-W_x CTRL-W x 將當前視窗與視窗 N 交換 (預設值: 下一個視窗) CTRL-W_z CTRL-W z 關閉預覽視窗 CTRL-W_bar CTRL-W | 將視窗寬度設定為 N 欄 CTRL-W_} CTRL-W } 在預覽視窗中顯示游標下的標籤 CTRL-W_<Down> CTRL-W <Down> 等同於 "CTRL-W j" CTRL-W_<Up> CTRL-W <Up> 等同於 "CTRL-W k" CTRL-W_<Left> CTRL-W <Left> 等同於 "CTRL-W h" CTRL-W_<Right> CTRL-W <Right> 等同於 "CTRL-W l"

2.3 方括號命令 [ ]

標籤 字元 注意 一般模式中的動作
------------------------------------------------------------------------------
[_CTRL-D [ CTRL-D 跳轉到當前檔案和包含檔案中找到的第一個與游標下單字匹配的 #define,從當前檔案的開頭開始搜尋 [_CTRL-I [ CTRL-I 跳轉到當前檔案和包含檔案中,包含游標下單字的第一行,從當前檔案的開頭開始搜尋 [# [# 1 游標移至 N 個上一個未匹配的 #if、#else 或 #ifdef [' [' 1 游標移至上一個小寫標記,在第一個非空白處 [( [( 1 游標向後移動 N 次到未匹配的 '(' [star [* 1 等同於 "[/" [` [ 1 游標移至上一個小寫標記 [/ [/ 1 游標移至 N 個上一個 C 註解的開頭 [D [D 列出當前檔案和包含檔案中找到的所有與游標下單字匹配的 define,從當前檔案的開頭開始搜尋 [I [I 列出當前檔案和包含檔案中找到的所有包含游標下單字的行,從當前檔案的開頭開始搜尋 [P [P 2 等同於 "[p" [[ [[ 1 游標向後移動 N 個章節 [] [] 1 游標向後移動 N 個章節 [c [c 1 游標向後移動 N 次到變更的開頭 [d [d 顯示當前檔案和包含檔案中找到的第一個與游標下單字匹配的 #define,從當前檔案的開頭開始搜尋 [f [f 等同於 "gf" [i [i 顯示當前檔案和包含檔案中找到的包含游標下單字的第一行,從當前檔案的開頭開始搜尋 [m [m 1 游標向後移動 N 次到成員函數的開頭 [p [p 2 類似於 "P",但調整縮排以符合當前行 [s [s 1 移動到上一個拼寫錯誤的單字 [z [z 1 移動到開啟的摺疊的開頭 [{ [{ 1 游標向後移動 N 次到未匹配的 '{' [<MiddleMouse> [<MiddleMouse> 2 等同於 "[p"
]_CTRL-D ] CTRL-D 跳轉到當前檔案和包含檔案中找到的第一個與游標下單字匹配的 #define,從游標位置開始搜尋 ]_CTRL-I ] CTRL-I 跳轉到當前檔案和包含檔案中,包含游標下單字的第一行,從游標位置開始搜尋 ]# ]# 1 游標移至 N 個下一個未匹配的 #endif 或 #else ]' ]' 1 游標移至下一個小寫標記,在第一個非空白處 ]) ]) 1 游標向前移動 N 次到未匹配的 ')' ]star ]* 1 等同於 "]/" ]` ]` 1 游標移至下一個小寫標記 ]/ ]/ 1 游標移至 N 個下一個 C 註解的結尾 ]D ]D 列出當前檔案和包含檔案中找到的所有與游標下單字匹配的 #define,從游標位置開始搜尋 ]I ]I 列出當前檔案和包含檔案中找到的所有包含游標下單字的行,從游標位置開始搜尋 ]P ]P 2 等同於 "[p" ][ ][ 1 游標向前移動 N 個章節 ]] ]] 1 游標向前移動 N 個章節 ]c ]c 1 游標向前移動 N 次到變更的開頭 ]d ]d 顯示當前檔案和包含檔案中找到的第一個與游標下單字匹配的 #define,從游標位置開始搜尋 ]f ]f 等同於 "gf" ]i ]i 顯示當前檔案和包含檔案中找到的包含游標下單字的第一行,從游標位置開始搜尋 ]m ]m 1 游標向前移動 N 次到成員函數的結尾 ]p ]p 2 類似於 "p",但調整縮排以符合當前行 ]s ]s 1 移動到下一個拼寫錯誤的單字 ]z ]z 1 移動到開啟的摺疊的結尾 ]} ]} 1 游標向前移動 N 次到未匹配的 '}' ]<MiddleMouse> ]<MiddleMouse> 2 等同於 "]p"

2.4 以 'g' 開頭的命令 g

標籤 字元 注意 一般模式中的動作
------------------------------------------------------------------------------
g_CTRL-G g CTRL-G 顯示目前游標位置的資訊 g_CTRL-H g CTRL-H 開始選取區塊模式 g_CTRL-] g CTRL-] :tjump 跳到游標下的標籤 g# g# 1 類似 "#",但不使用 "\<" 和 "\>" g$ g$ 1 當 'wrap' 關閉時,移動到螢幕上目前行的最右邊字元;當 'wrap' 開啟時,移動到螢幕上目前螢幕行的最右邊字元 g& g& 2 在所有行重複上次的 ":s" g' g'{mark} 1 類似 ' 但不改變跳躍清單 g` g`{mark} 1 類似 ` 但不改變跳躍清單 gstar g* 1 類似 "*",但不使用 "\<" 和 "\>" g+ g+ 前往較新的文字狀態 N 次 g, g, 1 前往變更清單中較新的位置 N 次 g- g- 前往較舊的文字狀態 N 次 g0 g0 1 當 'wrap' 關閉時,移動到螢幕上目前行的最左邊字元;當 'wrap' 開啟時,移動到螢幕上目前螢幕行的最左邊字元 g8 g8 列印游標下 UTF-8 字元所使用的位元組的十六進位值 g; g; 1 前往變更清單中較舊的位置 N 次 g< g< 顯示上一個命令的輸出 g? g? 2 Rot13 編碼運算子 g?g? g?? 2 Rot13 編碼目前行 g?g? g?g? 2 Rot13 編碼目前行 gD gD 1 跳到目前檔案中游標下單字的定義處 gE gE 1 向後移動到上一個 WORD 的結尾 gH gH 開始選取行模式 gI gI 2 類似 "I",但永遠從第 1 欄開始 gJ gJ 2 連接行,不插入空格 gN gN 1,2 尋找上一個符合上次使用搜尋模式的項目並以視覺模式選取 gP ["x]gP 2 將 [來自暫存器 x] 的文字貼到游標之前 N 次,並將游標留在其後 gQ gQ 切換到具有 Vim 編輯功能的 "Ex" 模式 gR gR 2 進入虛擬取代模式 gT gT 前往上一個索引標籤頁面 gU gU{motion} 2 將 Nmove 文字轉換為大寫 gV gV 在選取模式中執行對應或選單時,不重新選取先前的視覺區域 g] g] 對游標下的標籤執行 :tselect g^ g^ 1 當 'wrap' 關閉時,移動到螢幕上目前行的最左邊非空白字元;當 'wrap' 開啟時,移動到螢幕上目前螢幕行的最左邊非空白字元 g_ g_ 1 將游標移動到下方 N - 1 行的最後一個字元 ga ga 列印游標下字元的 ASCII 值 gd gd 1 跳到目前函式中游標下單字的定義處 ge ge 1 向後移動到上一個單字的結尾 gf gf 開始編輯游標下名稱的檔案 gF gF 開始編輯游標下名稱的檔案並跳到檔名後的行號 gg gg 1 將游標移動到第 N 行,預設為第一行 gh gh 開始選取模式 gi gi 2 類似 "i",但先移動到 '^ 標記 gj gj 1 類似 "j",但當 'wrap' 開啟時,向下移動 N 個螢幕行 gk gk 1 類似 "k",但當 'wrap' 開啟時,向上移動 N 個螢幕行 gm gm 1 移動到螢幕行中間的字元 gM gM 1 移動到文字行中間的字元 gn gn 1,2 尋找下一個符合上次使用搜尋模式的項目並以視覺模式選取 go go 1 將游標移動到緩衝區中的第 N 個位元組 gp ["x]gp 2 將 [來自暫存器 x] 的文字貼到游標之後 N 次,並將游標留在其後 gq gq{motion} 2 格式化 Nmove 文字 gr gr{char} 2 使用 {char} 虛擬取代 N 個字元 gs gs 睡眠 N 秒(預設為 1 秒) gt gt 前往下一個索引標籤頁面 gu gu{motion} 2 將 Nmove 文字轉換為小寫 gv gv 重新選取先前的視覺區域 gw gw{motion} 2 格式化 Nmove 文字並保留游標 netrw-gx gx 執行游標下檔名的應用程式(僅適用於 netrw 外掛程式) g@ g@{motion} 呼叫 'operatorfunc' g~ g~{motion} 2 交換 Nmove 文字的大小寫 g<Down> g<Down> 1 與 "gj" 相同 g<End> g<End> 1 與 "g$" 相同 g<Home> g<Home> 1 與 "g0" 相同 g<LeftMouse> g<LeftMouse> 與 <C-LeftMouse> 相同 g<MiddleMouse> 與 <C-MiddleMouse> 相同 g<RightMouse> g<RightMouse> 與 <C-RightMouse> 相同 g<Tab> g<Tab> 前往上次存取的索引標籤頁面 g<Up> g<Up> 1 與 "gk" 相同

2.5 以 'z' 開頭的命令 z

標籤 字元 注意 一般模式中的動作
------------------------------------------------------------------------------
z<CR> z<CR> 重繪,將游標行移到視窗頂部,游標位於第一個非空白字元 zN<CR> z{height}<CR> 重繪,使視窗高度為 {height}z+ z+ 游標位於第 N 行(預設為視窗下方的一行),否則與 "z<CR>" 相同 z- z- 重繪,將游標行移到視窗底部,游標位於第一個非空白字元 z. z. 重繪,將游標行移到視窗中央,游標位於第一個非空白字元 z= z= 提供拼寫建議 zA zA 開啟已關閉的摺疊或遞迴關閉已開啟的摺疊 zC zC 遞迴關閉摺疊 zD zD 遞迴刪除摺疊 zE zE 移除所有摺疊 zF zF 為 N 行建立摺疊 zG zG 暫時將單字標記為拼寫正確 zH zH 當 'wrap' 關閉時,向右捲動半個螢幕寬度 zL zL 當 'wrap' 關閉時,向左捲動半個螢幕寬度 zM zM 將 'foldlevel' 設定為零 zN zN 設定 'foldenable' zO zO 遞迴開啟摺疊 zR zR 將 'foldlevel' 設定為最深的摺疊層級 zW zW 暫時將單字標記為拼寫不正確 zX zX 重新套用 'foldlevel' z^ z^ 游標位於第 N 行(預設為視窗上方的一行),否則與 "z-" 相同 za za 開啟已關閉的摺疊,關閉已開啟的摺疊 zb zb 重繪,將游標行移到視窗底部 zc zc 關閉摺疊 zd zd 刪除摺疊 ze ze 當 'wrap' 關閉時,水平捲動以將游標定位在螢幕的結尾(右側) zf zf{motion} 為 Nmove 文字建立摺疊 zg zg 永久將單字標記為拼寫正確 zh zh 當 'wrap' 關閉時,向右捲動螢幕 N 個字元 zi zi 切換 'foldenable' zj zj 1 移動到下一個摺疊的開頭 zk zk 1 移動到上一個摺疊的結尾 zl zl 當 'wrap' 關閉時,向左捲動螢幕 N 個字元 zm zm 從 'foldlevel' 減一 zn zn 重設 'foldenable' zo zo 開啟摺疊 zp zp 以區塊模式貼上,不帶尾隨空格 zP zP 以區塊模式貼上,不帶尾隨空格 zr zr 將 'foldlevel' 加一 zs zs 當 'wrap' 關閉時,水平捲動以將游標定位在螢幕的開頭(左側) zt zt 重繪,將游標行移到視窗頂部 zuw zuw 取消 zw zug zug 取消 zg zuW zuW 取消 zW zuG zuG 取消 zG zv zv 開啟足夠的摺疊以檢視游標行 zw zw 永久將單字標記為拼寫不正確 zx zx 重新套用 'foldlevel' 並執行 "zv" zy zy 複製,不帶尾隨空格 zz zz 重繪,將游標行移到視窗中央 z<Left> z<Left> 與 "zh" 相同 z<Right> z<Right> 與 "zl" 相同

2.6 運算子待決模式 operator-pending-index

這些可以在運算子之後,但在輸入 {motion} 之前使用。
標籤 字元 運算子待決模式中的動作
------------------------------------------------------------------------------
o_v v 強制運算子以字元方式工作 o_V V 強制運算子以行方式工作 o_CTRL-V CTRL-V 強制運算子以區塊方式工作

3. 視覺模式 visual-index

視覺模式中的大多數命令與一般模式相同。這裡列出的是不同的命令。
標籤 命令 註解 視覺模式中的動作
------------------------------------------------------------------------------
v_CTRL-\_CTRL-N CTRL-\ CTRL-N 停止視覺模式 v_CTRL-\_CTRL-G CTRL-\ CTRL-G 進入一般模式 v_CTRL-A CTRL-A 2 在選取的文字中的數字加上 N v_CTRL-C CTRL-C 停止視覺模式 v_CTRL-G CTRL-G 在視覺模式和選取模式之間切換 v_<BS> <BS> 2 選取模式:刪除選取區域 v_CTRL-H CTRL-H 2 和 <BS> 相同 v_CTRL-O CTRL-O 切換為選取模式,但只執行一次指令後返回視覺模式 v_CTRL-V CTRL-V 將視覺模式設為區塊模式,或停止視覺模式 v_CTRL-X CTRL-X 2 在選取的文字中的數字減去 N v_<Esc> <Esc> 停止視覺模式 v_CTRL-] CTRL-] 跳到選取的標籤 v_! !{filter} 2 使用外部指令 {filter} 過濾選取的行 v_: : 以選取的行為範圍,開始指令列 v_< < 2 將選取的行向左移動一個 'shiftwidth' 位移寬度 v_= = 2 使用 'equalprg' 選項指定的外部程式,過濾選取的行 v_> > 2 將選取的行向右移動一個 'shiftwidth' 位移寬度 v_b_A A 2 區塊模式:在選取區域之後,在所有行附加相同的文字 v_C C 2 刪除選取的行並開始插入 v_D D 2 刪除選取的行 v_b_I I 2 區塊模式:在選取區域之前,在所有行插入相同的文字 v_J J 2 連接選取的行 v_K K 在選取區域執行 'keywordprg' v_O O 水平移動到選取區域的另一角 v_P P 使用暫存器內容取代選取區域;暫存器內容不變 v_R R 2 刪除選取的行並開始插入 v_S S 2 刪除選取的行並開始插入 v_U U 2 將選取區域轉換為大寫 v_V V 將視覺模式設為行模式,或停止視覺模式 v_X X 2 刪除選取的行 v_Y Y 複製選取的行 v_aquote a" 使用雙引號字串擴展選取區域 v_a' a' 使用單引號字串擴展選取區域 v_a( a( 與 ab 相同 v_a) a) 與 ab 相同 v_a< a< 使用 <> 區塊擴展選取區域 v_a> a> 與 a< 相同 v_aB aB 使用 {} 區塊擴展選取區域 v_aW aW 使用 "a WORD" 擴展選取區域 v_a[ a[ 使用 [] 區塊擴展選取區域 v_a] a] 與 a[ 相同 v_a` a` 使用反引號字串擴展選取區域 v_ab ab 使用 () 區塊擴展選取區域 v_ap ap 使用段落擴展選取區域 v_as as 使用句子擴展選取區域 v_at at 使用標籤區塊擴展選取區域 v_aw aw 使用 "a word" 擴展選取區域 v_a{ a{ 與 aB 相同 v_a} a} 與 aB 相同 v_c c 2 刪除選取區域並開始插入 v_d d 2 刪除選取區域 v_g_CTRL-A g CTRL-A 2 在選取的文字中的數字加上 N v_g_CTRL-X g CTRL-X 2 在選取的文字中的數字減去 N v_gJ gJ 2 連接選取的行,不插入空格 v_gq gq 2 格式化選取的行 v_gv gv 交換目前和先前的選取區域 v_iquote i" 使用雙引號字串擴展選取區域 (不含引號) v_i' i' 使用單引號字串擴展選取區域 (不含引號) v_i( i( 與 ib 相同 v_i) i) 與 ib 相同 v_i< i< 使用內部 <> 區塊擴展選取區域 v_i> i> 與 i< 相同 v_iB iB 使用內部 {} 區塊擴展選取區域 v_iW iW 使用 "inner WORD" 擴展選取區域 v_i[ i[ 使用內部 [] 區塊擴展選取區域 v_i] i] 與 i[ 相同 v_i` i` 使用反引號字串擴展選取區域 (不含反引號) v_ib ib 使用內部 () 區塊擴展選取區域 v_ip ip 使用內部段落擴展選取區域 v_is is 使用內部句子擴展選取區域 v_it it 使用內部標籤區塊擴展選取區域 v_iw iw 使用 "inner word" 擴展選取區域 v_i{ i{ 與 iB 相同 v_i} i} 與 iB 相同 v_o o 將游標移動到選取區域的另一角 v_p p 使用暫存器內容取代選取區域;刪除的文字在未命名暫存器中 v_r r 2 使用一個字元取代選取區域 v_s s 2 刪除選取區域並開始插入 v_u u 2 將選取區域轉換為小寫 v_v v 將視覺模式設為字元模式,或停止視覺模式 v_x x 2 刪除選取區域 v_y y 複製選取區域 v_~ ~ 2 交換選取區域的大小寫

4. 命令列編輯 ex-edit-index

使用 ':'、'!'、'/' 或 '?' 指令進入命令列。一般字元會插入在目前的游標位置。下面的「補全」指的是上下文相關的補全。它會根據情況補全檔案名稱、標籤、指令等等。
標籤 指令 在命令列編輯模式中的動作
------------------------------------------------------------------------------
CTRL-@ 未使用 c_CTRL-A CTRL-A 對游標前的模式執行補全,並插入所有符合的項目 c_CTRL-B CTRL-B 游標移至命令列開頭 c_CTRL-C CTRL-C<Esc> 相同 c_CTRL-D CTRL-D 列出符合游標前模式的補全項目 c_CTRL-E CTRL-E 游標移至命令列結尾 'cedit' CTRL-F 'cedit' 的預設值:開啟命令列視窗;否則未使用 c_CTRL-G CTRL-G'incsearch' 啟用時,尋找下一個符合的項目 c_<BS> <BS> 刪除游標前的字元 c_digraph {char1} <BS> {char2}'digraph' 開啟時,輸入二合字母 c_CTRL-H CTRL-H<BS> 相同 c_<Tab> <Tab> 如果 'wildchar'<Tab>:對游標前的模式執行補全 c_<S-Tab> <S-Tab>CTRL-P 相同 c_wildchar 'wildchar' 對游標前的模式執行補全 (預設值:<Tab>) c_CTRL-I CTRL-I<Tab> 相同 c_<NL> <NL><CR> 相同 c_CTRL-J CTRL-J<CR> 相同 c_CTRL-K CTRL-K {char1} {char2} 輸入二合字母 c_CTRL-L CTRL-L 對游標前的模式執行補全,並插入最長的共同部分 c_<CR> <CR> 執行輸入的指令 c_CTRL-M CTRL-M<CR> 相同 c_CTRL-N CTRL-N 在使用 'wildchar' 找到多個符合的項目後:移至下一個符合的項目,否則:從歷史記錄中召回較舊的命令列。CTRL-O 未使用 c_CTRL-P CTRL-P 在使用 'wildchar' 找到多個符合的項目後:移至上一個符合的項目,否則:從歷史記錄中召回較舊的命令列。 c_CTRL-Q CTRL-QCTRL-V 相同,除非它用於終端控制流程 c_CTRL-R CTRL-R {regname} 插入暫存器的內容或游標下的物件,如同已輸入 c_CTRL-R_CTRL-R CTRL-R CTRL-R {regname} c_CTRL-R_CTRL-O CTRL-R CTRL-O {regname} 依字面插入暫存器的內容或游標下的物件 CTRL-S 未使用,或用於終端控制流程 c_CTRL-T CTRL-T'incsearch' 啟用時,尋找上一個符合的項目 c_CTRL-U CTRL-U 移除所有字元 c_CTRL-V CTRL-V 依字面插入下一個非數字字元,插入三位數的十進制數字作為單一位元組。 c_CTRL-W CTRL-W 刪除游標前的單字 CTRL-X 未使用 (保留給補全) CTRL-Y 複製 (yank) 無模式選取 CTRL-Z 未使用 (保留給暫停) c_<Esc> <Esc> 放棄命令列而不執行它 c_CTRL-[ CTRL-[<Esc> 相同 c_CTRL-\_CTRL-N CTRL-\ CTRL-N 進入一般模式,放棄命令列 c_CTRL-\_CTRL-G CTRL-\ CTRL-G 進入一般模式,放棄命令列 CTRL-\ a - d 保留給擴充功能 c_CTRL-\_e CTRL-\ e {expr} 使用 {expr} 的結果取代命令列 CTRL-\ f - z 保留給擴充功能 CTRL-\ 其他未使用 c_CTRL-] CTRL-] 觸發縮寫 c_CTRL-^ CTRL-^ 切換 lmap 對應的使用 c_<Del> <Del> 刪除游標下的字元
c_<Left> <Left> 游標向左 c_<S-Left> <S-Left> 游標向左一個單字 c_<C-Left> <C-Left> 游標向左一個單字 c_<Right> <Right> 游標向右 c_<S-Right> <S-Right> 游標向右一個單字 c_<C-Right> <C-Right> 游標向右一個單字 c_<Up> <Up> 從歷史記錄中召回與游標前的模式符合的先前命令列 c_<S-Up> <S-Up> 從歷史記錄中召回先前的命令列 c_<Down> <Down> 從歷史記錄中召回與游標前的模式符合的下一個命令列 c_<S-Down> <S-Down> 從歷史記錄中召回下一個命令列 c_<Home> <Home> 游標移至命令列開頭 c_<End> <End> 游標移至命令列結尾 c_<PageDown> <PageDown><S-Down> 相同 c_<PageUp> <PageUp><S-Up> 相同 c_<Insert> <Insert> 切換插入/覆寫模式 c_<LeftMouse> <LeftMouse> 游標移至滑鼠點擊處
wildmenu 模式中的指令 (請參閱 'wildmenu')
<Up> 向上移動到父目錄 <Down> 向下移動到子選單 <Left> 選取上一個符合的項目 <Right> 選取下一個符合的項目 <CR> 在進行選單補全時移動到子選單 CTRL-E 停止補全並返回原始文字 CTRL-Y 接受選取的符合項目並停止補全 其他 停止補全並插入輸入的字元
在 wildmenu 模式中,當 'wildoptions' 設為 "pum" 時的指令
<PageUp> 選取往前數個項目的符合項目 <PageDown> 選取往後數個項目的符合項目

5. 終端機模式 terminal-mode-index

終端緩衝區中,除了 CTRL-\ 之外的所有按鍵都會轉發到終端作業。如果按下 CTRL-\,則下一個按鍵會被轉發,除非它是 CTRL-NCTRL-O。使用 CTRL-\_CTRL-N 進入普通模式。使用 t_CTRL-\_CTRL-O 執行一個普通模式命令,然後返回終端模式。
你找到了,亞瑟! 聖杯
這是所有 ":" 命令的簡短但完整的列表,沒有提及任何參數。命令名稱的可選部分在 [] 內。命令按照它們名稱的非可選部分排序。
標籤 命令 動作
------------------------------------------------------------------------------
: : nothing :range :{range} go to last line in {range} :! :! filter lines or execute an external command :!! :!! repeat last ":!" command :# :# same as ":number" :& :& repeat last ":substitute" :star :* use the last Visual area, like ":'<,'>" :< :< shift lines one 'shiftwidth' left := := print the last line number :> :> shift lines one 'shiftwidth' right :@ :@ execute contents of a register :@@ :@@ repeat the previous ":@" :2match :2mat[ch] define a second match to highlight :3match :3mat[ch] define a third match to highlight :Next :N[ext] go to previous file in the argument list :append :a[ppend] append text :abbreviate :ab[breviate] enter abbreviation :abclear :abc[lear] remove all abbreviations :aboveleft :abo[veleft] make split window appear left or above :all :al[l] open a window for each file in the argument list :amenu :am[enu] enter new menu item for all modes :anoremenu :an[oremenu] enter a new menu for all modes that will not be remapped :args :ar[gs] print the argument list :argadd :arga[dd] add items to the argument list :argdedupe :argded[upe] remove duplicates from the argument list :argdelete :argd[elete] delete items from the argument list :argedit :arge[dit] add item to the argument list and edit it :argdo :argdo do a command on all items in the argument list :argglobal :argg[lobal] define the global argument list :arglocal :argl[ocal] define a local argument list :argument :argu[ment] go to specific file in the argument list :ascii :as[cii] print ascii value of character under the cursor :autocmd :au[tocmd] enter or show autocommands :augroup :aug[roup] select the autocommand group to use :aunmenu :aun[menu] remove menu for all modes :buffer :b[uffer] go to specific buffer in the buffer list :bNext :bN[ext] go to previous buffer in the buffer list :ball :ba[ll] open a window for each buffer in the buffer list :badd :bad[d] add buffer to the buffer list :balt :balt like ":badd" but also set the alternate file :bdelete :bd[elete] remove a buffer from the buffer list :belowright :bel[owright] make split window appear right or below :bfirst :bf[irst] go to first buffer in the buffer list :blast :bl[ast] go to last buffer in the buffer list :bmodified :bm[odified] go to next buffer in the buffer list that has been modified :bnext :bn[ext] go to next buffer in the buffer list :botright :bo[tright] make split window appear at bottom or far right :bprevious :bp[revious] go to previous buffer in the buffer list :brewind :br[ewind] go to first buffer in the buffer list :break :brea[k] break out of while loop :breakadd :breaka[dd] add a debugger breakpoint :breakdel :breakd[el] delete a debugger breakpoint :breaklist :breakl[ist] list debugger breakpoints :browse :bro[wse] use file selection dialog :bufdo :bufdo execute command in each listed buffer :buffers :buffers list all files in the buffer list :bunload :bun[load] unload a specific buffer :bwipeout :bw[ipeout] really delete a buffer :change :c[hange] replace a line or series of lines :cNext :cN[ext] go to previous error :cNfile :cNf[ile] go to last error in previous file :cabbrev :ca[bbrev] like ":abbreviate" but for Command-line mode :cabclear :cabc[lear] clear all abbreviations for Command-line mode :cabove :cabo[ve] go to error above current line :caddbuffer :cad[dbuffer] add errors from buffer :caddexpr :cadde[xpr] add errors from expr :caddfile :caddf[ile] add error message to current quickfix list :cafter :caf[ter] go to error after current cursor :call :cal[l] call a function :catch :cat[ch] part of a :try command :cbefore :cbef[ore] go to error before current cursor :cbelow :cbel[ow] go to error below current line :cbottom :cbo[ttom] scroll to the bottom of the quickfix window :cbuffer :cb[uffer] parse error messages and jump to first error :cc :cc go to specific error :cclose :ccl[ose] close quickfix window :cd :cd change directory :cdo :cdo execute command in each valid error list entry :cfdo :cfd[o] execute command in each file in error list :center :ce[nter] format lines at the center :cexpr :cex[pr] read errors from expr and jump to first :cfile :cf[ile] read file with error messages and jump to first :cfirst :cfir[st] go to the specified error, default first one :cgetbuffer :cgetb[uffer] get errors from buffer :cgetexpr :cgete[xpr] get errors from expr :cgetfile :cg[etfile] read file with error messages :changes :changes print the change list :chdir :chd[ir] change directory :checkhealth :che[ckhealth] run healthchecks :checkpath :checkp[ath] list included files :checktime :checkt[ime] check timestamp of loaded buffers :chistory :chi[story] list the error lists :clast :cla[st] go to the specified error, default last one :clearjumps :cle[arjumps] clear the jump list :clist :cl[ist] list all errors :close :clo[se] close current window :cmap :cm[ap] like ":map" but for Command-line mode :cmapclear :cmapc[lear] clear all mappings for Command-line mode :cmenu :cme[nu] add menu for Command-line mode :cnext :cn[ext] go to next error :cnewer :cnew[er] go to newer error list :cnfile :cnf[ile] go to first error in next file :cnoremap :cno[remap] like ":noremap" but for Command-line mode :cnoreabbrev :cnorea[bbrev] like ":noreabbrev" but for Command-line mode :cnoremenu :cnoreme[nu] like ":noremenu" but for Command-line mode :copy :co[py] copy lines :colder :col[der] go to older error list :colorscheme :colo[rscheme] load a specific color scheme :command :com[mand] create user-defined command :comclear :comc[lear] clear all user-defined commands :compiler :comp[iler] do settings for a specific compiler :continue :con[tinue] go back to :while :confirm :conf[irm] prompt user when confirmation required :const :cons[t] create a variable as a constant :copen :cope[n] open quickfix window :cprevious :cp[revious] go to previous error :cpfile :cpf[ile] go to last error in previous file :cquit :cq[uit] quit Vim with an error code :crewind :cr[ewind] go to the specified error, default first one :cunmap :cu[nmap] like ":unmap" but for Command-line mode :cunabbrev :cuna[bbrev] like ":unabbrev" but for Command-line mode :cunmenu :cunme[nu] remove menu for Command-line mode :cwindow :cw[indow] open or close quickfix window :delete :d[elete] delete lines :debug :deb[ug] run a command in debugging mode :debuggreedy :debugg[reedy] read debug mode commands from normal input :delcommand :delc[ommand] delete user-defined command :delfunction :delf[unction] delete a user function :delmarks :delm[arks] delete marks :diffupdate :dif[fupdate] update 'diff' buffers :diffget :diffg[et] remove differences in current buffer :diffoff :diffo[ff] switch off diff mode :diffpatch :diffp[atch] apply a patch and show differences :diffput :diffpu[t] remove differences in other buffer :diffsplit :diffs[plit] show differences with another file :diffthis :diffthis make current window a diff window :digraphs :dig[raphs] show or enter digraphs :display :di[splay] display registers :djump :dj[ump] jump to #define :dl :dl short for :delete with the 'l' flag :dlist :dli[st] list #defines :doautocmd :do[autocmd] apply autocommands to current buffer :doautoall :doautoa[ll] apply autocommands for all loaded buffers :dp :d[elete]p short for :delete with the 'p' flag :drop :dr[op] jump to window editing file or edit file in current window :dsearch :ds[earch] list one #define :dsplit :dsp[lit] split window and jump to #define :edit :e[dit] edit a file :earlier :ea[rlier] go to older change, undo :echo :ec[ho] echoes the result of expressions :echoerr :echoe[rr] like :echo, show like an error and use history :echohl :echoh[l] set highlighting for echo commands :echomsg :echom[sg] same as :echo, put message in history :echon :echon same as :echo, but without <EOL> :else :el[se] part of an :if command :elseif :elsei[f] part of an :if command :emenu :em[enu] execute a menu by name :endif :en[dif] end previous :if :endfor :endfo[r] end previous :for :endfunction :endf[unction] end of a user function started with :function :endtry :endt[ry] end previous :try :endwhile :endw[hile] end previous :while :enew :ene[w] edit a new, unnamed buffer :eval :ev[al] evaluate an expression and discard the result :ex :ex same as ":edit" :execute :exe[cute] execute result of expressions :exit :exi[t] same as ":xit" :exusage :exu[sage] overview of Ex commands :fclose :fc[lose] close floating window :file :f[ile] show or set the current file name :files :files list all files in the buffer list :filetype :filet[ype] switch file type detection on/off :filter :filt[er] filter output of following command :find :fin[d] find file in 'path' and edit it :finally :fina[lly] part of a :try command :finish :fini[sh] quit sourcing a Vim script :first :fir[st] go to the first file in the argument list :fold :fo[ld] create a fold :foldclose :foldc[lose] close folds :folddoopen :foldd[oopen] execute command on lines not in a closed fold :folddoclosed :folddoc[losed] execute command on lines in a closed fold :foldopen :foldo[pen] open folds :for :for for loop :function :fu[nction] define a user function :global :g[lobal] execute commands for matching lines :goto :go[to] go to byte in the buffer :grep :gr[ep] run 'grepprg' and jump to first match :grepadd :grepa[dd] like :grep, but append to current list :gui :gu[i] start the GUI :gvim :gv[im] start the GUI :help :h[elp] open a help window :helpclose :helpc[lose] close one help window :helpgrep :helpg[rep] like ":grep" but searches help files :helptags :helpt[ags] generate help tags for a directory :highlight :hi[ghlight] specify highlighting methods :hide :hid[e] hide current buffer for a command :history :his[tory] print a history list :horizontal :hor[izontal] following window command work horizontally :insert :i[nsert] insert text :iabbrev :ia[bbrev] like ":abbrev" but for Insert mode :iabclear :iabc[lear] like ":abclear" but for Insert mode :if :if execute commands when condition met :ijump :ij[ump] jump to definition of identifier :ilist :il[ist] list lines where identifier matches :imap :im[ap] like ":map" but for Insert mode :imapclear :imapc[lear] like ":mapclear" but for Insert mode :imenu :ime[nu] add menu for Insert mode :inoremap :ino[remap] like ":noremap" but for Insert mode :inoreabbrev :inorea[bbrev] like ":noreabbrev" but for Insert mode :inoremenu :inoreme[nu] like ":noremenu" but for Insert mode :intro :int[ro] print the introductory message :isearch :is[earch] list one line where identifier matches :isplit :isp[lit] split window and jump to definition of identifier :iunmap :iu[nmap] like ":unmap" but for Insert mode :iunabbrev :iuna[bbrev] like ":unabbrev" but for Insert mode :iunmenu :iunme[nu] remove menu for Insert mode :join :j[oin] join lines :jumps :ju[mps] print the jump list :k :k set a mark :keepalt :keepa[lt] following command keeps the alternate file :keepmarks :kee[pmarks] following command keeps marks where they are :keepjumps :keepj[umps] following command keeps jumplist and marks :keeppatterns :keepp[atterns] following command keeps search pattern history :lNext :lN[ext] go to previous entry in location list :lNfile :lNf[ile] go to last entry in previous file :list :l[ist] print lines :labove :lab[ove] go to location above current line :laddexpr :lad[dexpr] add locations from expr :laddbuffer :laddb[uffer] add locations from buffer :laddfile :laddf[ile] add locations to current location list :lafter :laf[ter] go to location after current cursor :last :la[st] go to the last file in the argument list :language :lan[guage] set the language (locale) :later :lat[er] go to newer change, redo :lbefore :lbef[ore] go to location before current cursor :lbelow :lbel[ow] go to location below current line :lbottom :lbo[ttom] scroll to the bottom of the location window :lbuffer :lb[uffer] parse locations and jump to first location :lcd :lc[d] change directory locally :lchdir :lch[dir] change directory locally :lclose :lcl[ose] close location window :ldo :ld[o] execute command in valid location list entries :lfdo :lfd[o] execute command in each file in location list :left :le[ft] left align lines :leftabove :lefta[bove] make split window appear left or above :let :let assign a value to a variable or option :lexpr :lex[pr] read locations from expr and jump to first :lfile :lf[ile] read file with locations and jump to first :lfirst :lfir[st] go to the specified location, default first one :lgetbuffer :lgetb[uffer] get locations from buffer :lgetexpr :lgete[xpr] get locations from expr :lgetfile :lg[etfile] read file with locations :lgrep :lgr[ep] run 'grepprg' and jump to first match :lgrepadd :lgrepa[dd] like :grep, but append to current list :lhelpgrep :lh[elpgrep] like ":helpgrep" but uses location list :lhistory :lhi[story] list the location lists :ll :ll go to specific location :llast :lla[st] go to the specified location, default last one :llist :lli[st] list all locations :lmake :lmak[e] execute external command 'makeprg' and parse error messages :lmap :lm[ap] like ":map!" but includes Lang-Arg mode :lmapclear :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode :lnext :lne[xt] go to next location :lnewer :lnew[er] go to newer location list :lnfile :lnf[ile] go to first location in next file :lnoremap :ln[oremap] like ":noremap!" but includes Lang-Arg mode :loadkeymap :loadk[eymap] load the following keymaps until EOF :loadview :lo[adview] load view for current window from a file :lockmarks :loc[kmarks] following command keeps marks where they are :lockvar :lockv[ar] lock variables :lolder :lol[der] go to older location list :lopen :lope[n] open location window :lprevious :lp[revious] go to previous location :lpfile :lpf[ile] go to last location in previous file :lrewind :lr[ewind] go to the specified location, default first one :ls :ls list all buffers :ltag :lt[ag] jump to tag and add matching tags to the location list :lunmap :lu[nmap] like ":unmap!" but includes Lang-Arg mode :lua :lua execute Lua command :luado :luad[o] execute Lua command for each line :luafile :luaf[ile] execute Lua script file :lvimgrep :lv[imgrep] search for pattern in files :lvimgrepadd :lvimgrepa[dd] like :vimgrep, but append to current list :lwindow :lw[indow] open or close location window :move :m[ove] move lines :mark :ma[rk] set a mark :make :mak[e] execute external command 'makeprg' and parse error messages :map :map show or enter a mapping :mapclear :mapc[lear] clear all mappings for Normal and Visual mode :marks :marks list all marks :match :mat[ch] define a match to highlight :menu :me[nu] enter a new menu item :menutranslate :menut[ranslate] add a menu translation item :messages :mes[sages] view previously displayed messages :mkexrc :mk[exrc] write current mappings and settings to a file :mksession :mks[ession] write session info to a file :mkspell :mksp[ell] produce .spl spell file :mkvimrc :mkv[imrc] write current mappings and settings to a file :mkview :mkvie[w] write view of current window to a file :mode :mod[e] show or change the screen mode :next :n[ext] go to next file in the argument list :new :new create a new empty window :nmap :nm[ap] like ":map" but for Normal mode :nmapclear :nmapc[lear] clear all mappings for Normal mode :nmenu :nme[nu] add menu for Normal mode :nnoremap :nn[oremap] like ":noremap" but for Normal mode :nnoremenu :nnoreme[nu] like ":noremenu" but for Normal mode :noautocmd :noa[utocmd] following commands don't trigger autocommands :noremap :no[remap] enter a mapping that will not be remapped :nohlsearch :noh[lsearch] suspend 'hlsearch' highlighting :noreabbrev :norea[bbrev] enter an abbreviation that will not be remapped :noremenu :noreme[nu] enter a menu that will not be remapped :normal :norm[al] execute Normal mode commands :noswapfile :nos[wapfile] following commands don't create a swap file :number :nu[mber] print lines with line number :nunmap :nun[map] like ":unmap" but for Normal mode :nunmenu :nunme[nu] remove menu for Normal mode :oldfiles :ol[dfiles] list files that have marks in the shada file :omap :om[ap] like ":map" but for Operator-pending mode :omapclear :omapc[lear] remove all mappings for Operator-pending mode :omenu :ome[nu] add menu for Operator-pending mode :only :on[ly] close all windows except the current one :onoremap :ono[remap] like ":noremap" but for Operator-pending mode :onoremenu :onoreme[nu] like ":noremenu" but for Operator-pending mode :options :opt[ions] open the options-window :ounmap :ou[nmap] like ":unmap" but for Operator-pending mode :ounmenu :ounme[nu] remove menu for Operator-pending mode :ownsyntax :ow[nsyntax] set new local syntax highlight for this window :packadd :pa[ckadd] add a plugin from 'packpath' :packloadall :packl[oadall] load all packages under 'packpath' :pclose :pc[lose] close preview window :pedit :ped[it] edit file in the preview window :perl :pe[rl] execute perl command :perldo :perld[o] execute perl command for each line :perlfile :perlf[ile] execute perl script file :print :p[rint] print lines :profdel :profd[el] stop profiling a function or script :profile :prof[ile] profiling functions and scripts :pop :po[p] jump to older entry in tag stack :popup :popu[p] popup a menu by name :ppop :pp[op] ":pop" in preview window :preserve :pre[serve] write all text to swap file :previous :prev[ious] go to previous file in argument list :psearch :ps[earch] like ":ijump" but shows match in preview window :ptag :pt[ag] show tag in preview window :ptNext :ptN[ext] :tNext in preview window :ptfirst :ptf[irst] :trewind in preview window :ptjump :ptj[ump] :tjump and show tag in preview window :ptlast :ptl[ast] :tlast in preview window :ptnext :ptn[ext] :tnext in preview window :ptprevious :ptp[revious] :tprevious in preview window :ptrewind :ptr[ewind] :trewind in preview window :ptselect :pts[elect] :tselect and show tag in preview window :put :pu[t] insert contents of register in the text :pwd :pw[d] print current directory :py3 :py3 execute Python 3 command :python3 :python3 same as :py3 :py3do :py3d[o] execute Python 3 command for each line :py3file :py3f[ile] execute Python 3 script file :python :py[thon] execute Python command :pydo :pyd[o] execute Python command for each line :pyfile :pyf[ile] execute Python script file :pyx :pyx execute python_x command :pythonx :pythonx same as :pyx :pyxdo :pyxd[o] execute python_x command for each line :pyxfile :pyxf[ile] execute python_x script file :quit :q[uit] quit current window (when one window quit Vim) :quitall :quita[ll] quit Vim :qall :qa[ll] quit Vim :read :r[ead] read file into the text :recover :rec[over] recover a file from a swap file :redo :red[o] redo one undone change :redir :redi[r] redirect messages to a file or register :redraw :redr[aw] force a redraw of the display :redrawstatus :redraws[tatus] force a redraw of the status line(s) and window bar(s) :redrawtabline :redrawt[abline] force a redraw of the tabline :registers :reg[isters] display the contents of registers :resize :res[ize] change current window height :retab :ret[ab] change tab size :return :retu[rn] return from a user function :rewind :rew[ind] go to the first file in the argument list :right :ri[ght] right align text :rightbelow :rightb[elow] make split window appear right or below :rshada :rsh[ada] read from shada file :ruby :rub[y] execute Ruby command :rubydo :rubyd[o] execute Ruby command for each line :rubyfile :rubyf[ile] execute Ruby script file :rundo :rund[o] read undo information from a file :runtime :ru[ntime] source vim scripts in 'runtimepath' :substitute :s[ubstitute] find and replace text :sNext :sN[ext] split window and go to previous file in argument list :sandbox :san[dbox] execute a command in the sandbox :sargument :sa[rgument] split window and go to specific file in argument list :sall :sal[l] open a window for each file in argument list :saveas :sav[eas] save file under another name. :sbuffer :sb[uffer] split window and go to specific file in the buffer list :sbNext :sbN[ext] split window and go to previous file in the buffer list :sball :sba[ll] open a window for each file in the buffer list :sbfirst :sbf[irst] split window and go to first file in the buffer list :sblast :sbl[ast] split window and go to last file in buffer list :sbmodified :sbm[odified] split window and go to modified file in the buffer list :sbnext :sbn[ext] split window and go to next file in the buffer list :sbprevious :sbp[revious] split window and go to previous file in the buffer list :sbrewind :sbr[ewind] split window and go to first file in the buffer list :scriptnames :scr[iptnames] list names of all sourced Vim scripts :scriptencoding :scripte[ncoding] encoding used in sourced Vim script :set :se[t] show or set options :setfiletype :setf[iletype] set 'filetype', unless it was set already :setglobal :setg[lobal] show global values of options :setlocal :setl[ocal] show or set options locally :sfind :sf[ind] split current window and edit file in 'path' :sfirst :sfir[st] split window and go to first file in the argument list :sign :sig[n] manipulate signs :silent :sil[ent] run a command silently :sleep :sl[eep] do nothing for a few seconds :slast :sla[st] split window and go to last file in the argument list :smagic :sm[agic] :substitute with 'magic' :smap :smap like ":map" but for Select mode :smapclear :smapc[lear] remove all mappings for Select mode :smenu :sme[nu] add menu for Select mode :snext :sn[ext] split window and go to next file in the argument list :snomagic :sno[magic] :substitute with 'nomagic' :snoremap :snor[emap] like ":noremap" but for Select mode :snoremenu :snoreme[nu] like ":noremenu" but for Select mode :sort :sor[t] sort lines :source :so[urce] read Vim or Ex commands from a file :spelldump :spelld[ump] split window and fill with all correct words :spellgood :spe[llgood] add good word for spelling :spellinfo :spelli[nfo] show info about loaded spell files :spellrare :spellra[re] add rare word for spelling :spellrepall :spellr[epall] replace all bad words like last z= :spellundo :spellu[ndo] remove good or bad word :spellwrong :spellw[rong] add spelling mistake :split :sp[lit] split current window :sprevious :spr[evious] split window and go to previous file in the argument list :srewind :sre[wind] split window and go to first file in the argument list :stop :st[op] suspend the editor or escape to a shell :stag :sta[g] split window and jump to a tag :startinsert :star[tinsert] start Insert mode :startgreplace :startg[replace] start Virtual Replace mode :startreplace :startr[eplace] start Replace mode :stopinsert :stopi[nsert] stop Insert mode :stjump :stj[ump] do ":tjump" and split window :stselect :sts[elect] do ":tselect" and split window :sunhide :sun[hide] same as ":unhide" :sunmap :sunm[ap] like ":unmap" but for Select mode :sunmenu :sunme[nu] remove menu for Select mode :suspend :sus[pend] same as ":stop" :sview :sv[iew] split window and edit file read-only :swapname :sw[apname] show the name of the current swap file :syntax :sy[ntax] syntax highlighting :syntime :synti[me] measure syntax highlighting speed :syncbind :sync[bind] sync scroll binding :t :t same as ":copy" :tNext :tN[ext] jump to previous matching tag :tabNext :tabN[ext] go to previous tab page :tabclose :tabc[lose] close current tab page :tabdo :tabdo execute command in each tab page :tabedit :tabe[dit] edit a file in a new tab page :tabfind :tabf[ind] find file in 'path', edit it in a new tab page :tabfirst :tabfir[st] go to first tab page :tablast :tabl[ast] go to last tab page :tabmove :tabm[ove] move tab page to other position :tabnew :tabnew edit a file in a new tab page :tabnext :tabn[ext] go to next tab page :tabonly :tabo[nly] close all tab pages except the current one :tabprevious :tabp[revious] go to previous tab page :tabrewind :tabr[ewind] go to first tab page :tabs :tabs list the tab pages and what they contain :tab :tab create new tab when opening new window :tag :ta[g] jump to tag :tags :tags show the contents of the tag stack :tcd :tc[d] change directory for tab page :tchdir :tch[dir] change directory for tab page :terminal :te[rminal] open a terminal buffer :tfirst :tf[irst] jump to first matching tag :throw :th[row] throw an exception :tjump :tj[ump] like ":tselect", but jump directly when there is only one match :tlast :tl[ast] jump to last matching tag :tlmenu :tlm[enu] add menu for Terminal-mode :tlnoremenu :tln[oremenu] like ":noremenu" but for Terminal-mode :tlunmenu :tlu[nmenu] remove menu for Terminal-mode :tmapclear :tmapc[lear] remove all mappings for Terminal-mode :tmap :tma[p] like ":map" but for Terminal-mode :tmenu :tm[enu] define menu tooltip :tnext :tn[ext] jump to next matching tag :tnoremap :tno[remap] like ":noremap" but for Terminal-mode :topleft :to[pleft] make split window appear at top or far left :tprevious :tp[revious] jump to previous matching tag :trewind :tr[ewind] jump to first matching tag :trust :trust add or remove file from trust database :try :try execute commands, abort on error or exception :tselect :ts[elect] list matching tags and select one :tunmap :tunma[p] like ":unmap" but for Terminal-mode :tunmenu :tu[nmenu] remove menu tooltip :undo :u[ndo] undo last change(s) :undojoin :undoj[oin] join next change with previous undo block :undolist :undol[ist] list leafs of the undo tree :unabbreviate :una[bbreviate] remove abbreviation :unhide :unh[ide] open a window for each loaded file in the buffer list :unlet :unl[et] delete variable :unlockvar :unlo[ckvar] unlock variables :unmap :unm[ap] remove mapping :unmenu :unme[nu] remove menu :unsilent :uns[ilent] run a command not silently :update :up[date] write buffer if modified :vglobal :v[global] execute commands for not matching lines :version :ve[rsion] print version number and other info :verbose :verb[ose] execute command with 'verbose' set :vertical :vert[ical] make following command split vertically :vimgrep :vim[grep] search for pattern in files :vimgrepadd :vimgrepa[dd] like :vimgrep, but append to current list :visual :vi[sual] same as ":edit", but turns off "Ex" mode :viusage :viu[sage] overview of Normal mode commands :view :vie[w] edit a file read-only :vmap :vm[ap] like ":map" but for Visual+Select mode :vmapclear :vmapc[lear] remove all mappings for Visual+Select mode :vmenu :vme[nu] add menu for Visual+Select mode :vnew :vne[w] create a new empty window, vertically split :vnoremap :vn[oremap] like ":noremap" but for Visual+Select mode :vnoremenu :vnoreme[nu] like ":noremenu" but for Visual+Select mode :vsplit :vs[plit] split current window vertically :vunmap :vu[nmap] like ":unmap" but for Visual+Select mode :vunmenu :vunme[nu] remove menu for Visual+Select mode :windo :windo execute command in each window :write :w[rite] write to a file :wNext :wN[ext] write to a file and go to previous file in argument list :wall :wa[ll] write all (changed) buffers :while :wh[ile] execute loop for as long as condition met :winsize :wi[nsize] get or set window size (obsolete) :wincmd :winc[md] execute a Window (CTRL-W) command :winpos :winp[os] get or set window position :wnext :wn[ext] write to a file and go to next file in argument list :wprevious :wp[revious] write to a file and go to previous file in argument list :wq :wq write to a file and quit window or Vim :wqall :wqa[ll] write all changed buffers and quit Vim :wshada :wsh[ada] write to ShaDa file :wundo :wu[ndo] write undo information to a file :xit :x[it] write if buffer changed and close window :xall :xa[ll] same as ":wqall" :xmapclear :xmapc[lear] remove all mappings for Visual mode :xmap :xm[ap] like ":map" but for Visual mode :xmenu :xme[nu] add menu for Visual mode :xnoremap :xn[oremap] like ":noremap" but for Visual mode :xnoremenu :xnoreme[nu] like ":noremenu" but for Visual mode :xunmap :xu[nmap] like ":unmap" but for Visual mode :xunmenu :xunme[nu] remove menu for Visual mode :yank :y[ank] yank lines into a register :z :z print some lines :~ :~ repeat last ":substitute"
主要
命令索引
快速參考