2012-02-07 83 views
18

假設您使用vim以可視模式進行選擇。您擊中v,然後開始向右移動l。然後,假設您希望將選擇擴展到左側,而不改變右側的點。也就是說,您對'>感到滿意,但想要更改'<Vim:反向視覺模式透視

你如何交換,以便它好像你在'>開始,並選擇在左邊,改變'<

我有一個模糊的回憶,我以前見過這個,但很難谷歌。

回答

19

哎呀,多麼驚人的張貼到計算器可以使讀取(F)手冊容易得多......

3. Changing the Visual area    *visual-change* 

          *v_o* 
o   Go to Other end of highlighted text: The current 
      cursor position becomes the start of the highlighted 
      text and the cursor is moved to the other end of the 
      highlighted text. The highlighted area remains the 
      same. 
+1

大問題答案;) – lucapette 2012-02-07 23:04:01

+3

不要忘記在塊狀(矩形)選擇中的大寫「O」,它不會變成對角線:':help v_O'。 – Benoit 2012-02-08 07:44:04

5

o

從文檔:

o   Go to Other end of highlighted text: The current 
      cursor position becomes the start of the highlighted 
      text and the cursor is moved to the other end of the 
      highlighted text. The highlighted area remains the 
      same.