URL: http://www.math.fu-berlin.de/~guckes/vim/howto/teach.html
URL: https://www.vim8.org/howto/teach.html (mirror)
Created: Fri Aug 07 20:15:00 CEST 1998
Last update: Fri Aug 07 20:17:12 CEST 1998
HowTo Teach Vim
This is an outline of how I'd teach people to use Vim.
Start on an existing file
Start vim on a big textfile to show the basic commands:
vim bigtext
Explain that Vim is in command mode,
ie typing letters are used to give commands.
Before making changes to the file, explain about "jump commands" first.
This will be helpful when explaining about making changes using jumps.
Simple jumps
Start off with "simple jumps", ie jumps by just one character or line
backard and forward, ie commands "hjkl" to move the cursor.
Jumping by Words
Show "word jumps", ie "bw".
Explain that Vim will stop at characters that are not part of words"".
Then show "WORD jumps" ('B' and 'W') and explain about "whitespace"
as delimiters between WORDs.
Explain "words" and "WORDS" as "text objects" and define
"sentences" and "paragraphs".
Show the jump commands which jump by these objects, ie "(){}".
Point out that these are non-letter commands.
Jumps on the current line
Continue with other non-letter commands:
Explain the special jumps with '0' and '$'.
Show "inline jumps", ie "fFtT".
New concept: Command sequence (two characters).
Useful option: ":set showcmd" to show "partial commands".
Explain about repeating the last "find command" with the comma and semicolon.
(Again an example of non-letter commands.)
Fast Jumps on Window
Show the three basic jumps to quickly access the start, middle, and end
of the current window: "HML" ("high/home", "middle", "last/low").
Simple scrolling
Commands ^E and ^Y.
Explain about the notation of control characters.
Fast scrolling
Commands ^D and ^U.
Finding text that is possibly on another window
Exaplain simple searches with '/' and '?'.
Continue with the "next match" commands 'n' and 'N'.
Number Prefix
Explain about entering digits and how they add up to numbers.
(Again, "set showcmd" is useful here.)
Explain how a number prefix "repeats" following commands.
Examples: "5w", "3W", "2)", "2}", "3n".
Explain the notation in the command overview
that shows 'N' in front of the keys to denote a possible number prefix.
Changes
Start with the most simple change commands", ie 'x' and 'X'.
Send feedback on this page to
Sven Guckes
[email protected]