Intro to Operators
So far, you've learned how to move through text with motions. Now it's time to take action on text using operators.
Operators are commands that perform actions on text. Think of them as verbs in Vim's language.
Operators must be followed by a motion to specify what part of the text to operate on.
operator
the action to perform,
such as delete or copy.
such as delete or copy.
+
motion
the range of text
to perform the action on
to perform the action on
For example, the d operator deletes text. When followed by a motion, it deletes the text in the specified range:
d
w
Example
d
$
Example
After learning a handful of operators and motions, you can mix and match them to perform a wide variety of text operations.
In the next several lessons, you'll learn about the core operators and practice combining them with motions to perform powerful text operations.