← All lessons

5. Visual Mode

Step 7 of 7

Selecting text objects

Manually selecting a text region is useful for making small, precise edits. But sometimes, we’re interested in the bigger picture. For example, we might want to visually select an entire sentence, paragraph, or block of code.

Visual mode has key maps for this. From any of the visual mode variants, you can use:

There are similar mappings for (, [, and so forth, too.

So to immediately select an entire sentence, you can type vis. Or, to immediately select an entire paragraph, it’s vip.

Give it a try in the editor. Enter visual mode, and try expanding your selection using the keymaps above.

Loading editor…