Vim Tutor
From Vim Tips Wiki
Proposed new tip
Please do not discuss this tip on this page, and do not edit the talk (discussion) page.
Created: February 16, 2008
Complexity: basic
Author: Metacosm
Version: 7.0
This is what the Vim manual has to say about Vimtutor:
*01.3* Using the Vim tutor *tutor* *vimtutor*
Instead of reading the text (boring!) you can use the vimtutor to learn your
first Vim commands. This is a 30 minute tutorial that teaches the most basic
Vim functionality hands-on.
On Unix and MS-Windows, if Vim has been properly installed, you can start it
from the shell:
vimtutor
This will make a copy of the tutor file, so that you can edit it without the
risk of damaging the original.
There are a few translated versions of the tutor. To find out if yours is
available, use the two-letter language code. For French:
vimtutor fr
For OpenVMS, if Vim has been properly installed, you can start vimtutor from a
VMS prompt with:
@VIM:vimtutor
Optionally add the two-letter language code as above.
On other systems, you have to do a little work:
1. Copy the tutor file. You can do this with Vim (it knows where to find it):
vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q'
This will write the file "TUTORCOPY" in the current directory. To use a
translated version of the tutor, append the two-letter language code to the
filename. For French:
vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q'
2. Edit the copied file with Vim:
vim -u NONE -c "set nocp" TUTORCOPY
The extra arguments make sure Vim is started in a good mood.
3. Delete the copied file when you are finished with it:
del TUTORCOPY
