zhuang@linux:~/reading/practical-vim/01-the-vim-way/$ less
The Vim Way
This post extracts some knowledge from Chapter 1 – The Vim Way.
The dot command lets us repeat the last change.
The >G command increases the indentation from the current line until the end of the file.
| Compound Command | Equivalent in Longhand |
|---|---|
C | c$ |
s | cl |
S | ^C |
I | ^i |
| Intent | Act | Repeat | Reverse |
|---|---|---|---|
| Make a change | {edit} | . | u |
| Scan line for next character | f{char} / t{char} | ; | , |
| Scan line for previous character | F{char} / T{char} | ; | , |
| Scan document for next match | /pattern<CR> | n | N |
| Scan document for previous match | ?pattern<CR> | n | N |
| Perform substitution | :s/target/replacement | & | u |
| Execute a sequence of changes | qx{changes}q | @x | u |
* executes a search for the word under the cursor.
The Ideal: One Keystroke to Move, One Keystroke to Execute
zhuang@linux:~/reading/practical-vim/01-the-vim-way/$ comments