← All lessons

9. Operators Motions And Text Objects

Step 5 of 6

Vim’s various text objects

Now that we understand the distinction between inner and outer text objects, let’s explore what Vim provides us with.

Each of the text objects below has an inner and outer variant. If you read p, that means you can use ip for the inner variant and ap for the outer variant.

There’s a lot of them! Thankfully, they are mostly intuitive — if you’re targeting a quoted string, you use ", or if you’re targeting the text within some parentheses, you use (.

Let’s practice. In the editor, you’ve got some text that is full of places where you can use these text objects. Try using them in conjunction with the operators we learned earlier!

Loading editor…