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
1
const 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!

  1. Navigate to each green target across the code snippet.
  2. Use the motions and techniques learned in this lesson to land accurately on each target.
  3. See how fast you can complete 10 targets.
0/10
1
const description = "expand this selection both ways";
NORMAL
00:00