zhuang@linux:~/notes/practical-vim/01-the-vim-way/$ less

Practical Vim / chapter 01

The Vim Way

This post extracts some knowledge from Practical Vim 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 CommandEquivalent in LonghandExplanation
Cc$Delete from the cursor to the end of the line and enter Insert mode.
sclDelete the character under the cursor and enter Insert mode.
S^CDelete the contents of the current line and enter Insert mode.
I^iMove to the first non-blank character of the line and enter Insert mode.
IntentActRepeatReverse
Make a change{edit}.u
Scan line for next characterf{char} / t{char};,
Scan line for previous characterF{char} / T{char};,
Scan document for next match/pattern<CR>nN
Scan document for previous match?pattern<CR>nN
Perform substitution:s/target/replacement&u
Execute a sequence of changesqx{changes}q@xu

* executes a search for the word under the cursor.

The Ideal: One Keystroke to Move, One Keystroke to Execute

zhuang@linux:~/notes/practical-vim/01-the-vim-way/$ comments