Mission 49 / 52• Visual Mode
Switch Selection Ends
Ever made a selection only to realize you started one word too late? In graphical editors, you have to restart.
In Vim, pressing `o` (for 'other end') hops the cursor to the opposite end of the selection, letting you expand backward!
Switching selection ends
- omove cursor to other end of visual selection
1const description = "expand this selection both ways";Start a selection with `v` on `selection`, expand forward with `w`, then press `o` to jump to the front and expand backward with `b`!
Now it's your turn!
- Navigate to each green target across the code snippet.
- Use the motions and techniques learned in this lesson to land accurately on each target.
- See how fast you can complete 10 targets.
0/10
1const description = "expand this selection both ways";NORMAL
00:00
NextCtrl+jVisual Line Mode