x 刪除游標下的字元 ("dl" 的縮寫)
x 刪除游標前的字元 ("dh" 的縮寫)
d 從當前位置刪除到行尾 ("d$" 的縮寫)
dw 從當前位置刪除到下乙個單詞開頭
db 從當前位置刪除到前乙個單詞的開頭
diw 刪除游標上的單詞 (不包括空白字元)
daw 刪除游標上的單詞 (包括空白字元)
dg 刪除到檔案末
dgg 刪除到檔案首
"dl" 刪除字元 (縮寫: "x") |dl|
"diw" 刪除內含單詞 *diw*
"daw" 刪除乙個單詞 *daw*
"diw" 刪除內含字串 (見 |word|) *diw*
"daw" 刪除乙個字串 (見 |word|) *daw*
"dd" 刪除一行 |dd|
"dis" 刪除內含句子 *dis*
"das" 刪除乙個句子 *das*
"dib" 刪除內含 '(' ')' 塊 *dib*
"dab" 刪除乙個 '(' ')' 塊 *dab*
"dip" 刪除內含段落 *dip*
"dap" 刪除乙個段落 *dap*
"dib" 刪除內含 '' 大塊 *dib*
"dab" 刪除乙個 '' 大塊 *dab
VIM刪除命令
x 刪除游標所在處字元 x 刪除游標所在前字元dw 刪除到下乙個單詞開頭 de 刪除到本單詞末尾 de 刪除到本單詞末尾,包括標點符號在內 db 刪除到前乙個單詞 db 刪除到前乙個單詞,包括標點符號在內很明顯,這裡的d是delete的意思,而字元刪除的x是是老式清除的意思,e和b分別標識向前和向後...
VIM文字替換命令
在vim中進行文字替換 1.替換當前行中的內容 s from to s即substitude s from to 將當前行中的第乙個from,替換成to。如果當前行含有多個 from,則只會替換其中的第乙個。s from to g 將當前行中的所有from都替換成to。s from to gc 將當...
VIM文字替換命令
在vim中進行文字替換 1.替換當前行中的內容 s from to s即substitude s from to 將當前行中的第乙個from,替換成to。如果當前行含有多個 from,則只會替換其中的第乙個。s from to g 將當前行中的所有from都替換成to。s from to gc 將當...