try it play_arrow

Vim's syntax is intuitive: Actions operating on text Objects

try typing ' d + a + w ' to delete the word under your cursor

d is the delete Action
a is around
w w is word.

This syntax generalizes to sentences, paragraphs, quotes, and other objects. To delete a paragraph: ' d + a + p '

Handy Actions:
d delete
c to change (deletes and puts you in insert mode)
y yank (vim lingo for copy)

These actions can operate a around or i inside

Objects like a p paragraph or s sentence, but also
" quotes, ( and parenthesis.

try ' d + i + " ' inside the parenthesis in line 8. Ain't it magic?

try ' d + w ' at the start of line 15.

You just deleted a word.
To repeat the last action, just type: .
(this is super handy)

You can also run an action any number of times. Try adding 3 before deleting a word:

' 3 + d + w ' at the start of line 17.

You can also repeat motions. Try moving to the next space:

' f + space '

To repeat the motion, just type: ;

One common operation is changing text inside quotes.

change the value of y on line 9:
' c + i + " '

You can do the same for [], (), and {}.

In Vim you don't need to memorize many complex commands.
Instead, learn an action and it'll apply to objects you already know. The key is combining actions and objects, in the natural way you would speak out loud "delete inside brackets!"

Challenge: can you delete the useless paragraph in quotes in only three keystrokes?

""" learn vim interactively """ def useless(): x = "delete me" y = "I'm more text" my_list = [thing1, thing2, thing3] return None """ This is a useless paragraph. Full of mumbojumbo. Please delete all of me, so I don't clutter this workspace. Can you do it with a single action on a object? """ next = "superpowers: actions + objects"