2012-02-07 15 views
18

Supponiamo che tu stia utilizzando vim per selezionare in modalità visiva. Hai colpito v, quindi inizia a spostarti a destra con l. Quindi, diciamo che desideri estendere la selezione a sinistra, senza modificare il punto a destra. Cioè, sei soddisfatto di '> ma vuoi cambiare '<.Vim: prospettiva in modalità visuale inversa

Come si scambia in modo che sia come se si fosse iniziato a '> e si sta selezionando a sinistra, modificando '<?

Ho un vago ricordo che ho già visto prima, ma è difficile cercare su Google.

risposta

19

Ops, come sorprendente intervento a StackOverflow può rendere la lettura del manuale (F) che molto più facile ...

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

Grande domanda e risposta;) – lucapette

+3

Non dimenticare maiuscola 'O' nella selezione a blocchi (rettangolare), che non va in diagonale:': help v_O'. – Benoit

5

o

Dalla documentazione:

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. 
Problemi correlati