用 vim 這麼久了,一直都沒發現有這個功能(應該說還有很多功能不知道吧= =)。
c: operator 代表 change
i: inner
w: word
所以把遊標移動到一個 word 上按下 ciw 便會把一個 word 去掉後直接進入 insert 模式,這樣在 coding 的時候就不必把一個 word 用 x 刪掉後再打了。同樣的 operator 還有 r (replace), d (delete), ...等。
help 裡面有更多說明:
:h visual
:h operator
:h motion
Link
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment