Mastering the Vim Language Watching Note
- 2020-1-26
"Sometimes you gotta work a little so you can ball a lot"
Learning VIM is a process.
INVESTING IN YOURSELF!
Typing is not the bottleneck!
- It's different
- Not @ work
- break up with your mouse
- But can it...?
- Always a better way
- Learn new things every week
1 | Operator + [Count] + Motion |
Operator:
- c - Change
- d - Delete ### 3. v - Visual Mode #### Examples
Motion:
w
word + right whitespace;W
WORDe
end of the word;E
WORDb
first the word;B
WORDs
surrounding
Tips for Mastering the VIM Language
- Use "dot" command to repeat the work
- Use more general text objects (iw instead of w for example)
- Prefer text objects to motions when possible
- Use relative number
- Visual Mode Is a Smell: Can't be remembered by "dot" command
- c + S clear current line
- c + s +
surrounding
change surroundings - d + d delete current line, and move cursor to the beginning of the last line.
- y + s + i + w/W +
surrounding
: Add surroundings (Support'
,.
,<
)- y + s + i + w/W + {: Add
{
and}
around the text-object. - y + s + i + w/W + }: Add
{
and}
around the text-object.
- y + s + i + w/W + {: Add