標籤:vim visual模式 select
Visual mode allows us to select a range of text and then operate upon it. However intuitive this might seem, Vim’s perspective on selecting text is different from other text editors。
Visual模式允許使用者方便的選擇一段文字然後進行操作。Vim下的文本選擇方式和我們一般所遇到的文字編輯器不一樣。
Many of the commands that you are familiar with from Normal mode work just the same in Visual mode. We can still use h , j , k, and l as cursor keys.
We can use f{char} to jump to a character on the current line and then repeat or reverse the jump with the ; and , commands, respectively. We can even use the search command (and n / N) to jump to pattern matches. Each time we move our cursor in Visual mode, we change the bounds of the selection
在 visual模式下,可以執行許多Normal模式下的命令。比如可以使用h,j,k和l來移動游標,可以使用 f{char}
在當前行跳到字元位置,使用;
或,
重複命令。我們還可以使用搜尋命令,然後使用n
或N
跳到模式比對的項上。在Visual模式中通過移動游標可以改變文本選擇的範圍。
[Practical.Vim(2012.9)].Drew.Neil.Tip20學習摘要