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
Press Enter to start
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!
0 / 3 tasks complete0.0s / 11s par0 / 10 par
Practice this lesson's commands. Each task checks your technique and the result, not just your cursor position. Take your time.
Task 1: Select middle forward with ve, then switch active cursor with o.
Show hint
Press v, e, then o.
Press Enter to start
1start middle endjkscroll•ggGtop/bottom•Tabnext example•Enterstart•qstop•Ctrl+kCtrl+jprev/next