October 2015
Intermediate to advanced
356 pages
7h 54m
English
| Tip 12 | Combine and Conquer |
Much of Vim’s power stems from the way that operators and motions can be combined. In this tip, we’ll look at how this works and consider the implications.
The d{motion} command can operate on a single character (dl), a complete word (daw), or an entire paragraph (dap). Its reach is defined by the motion. The same goes for c{motion}, y{motion}, and a handful of others. Collectively, these commands are called operators. You can find the complete list by looking up operatorⓘ, while Table 2, Vim’s Operator Commands, summarizes some of the more common ones.
| Trigger | Effect |
|---|---|
c | Change |
d | Delete |
y | Yank into register |
g~ | Swap case |
gu | Make lowercase |
gU | Make uppercase |
> | Shift right ... |