blob: 39a603ac1867310563308d054ecb5846f0c38408 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001*usr_01.txt* For Vim version 7.0aa. Last change: 2004 May 01
2
3 VIM USER MANUAL - by Bram Moolenaar
4
5 About the manuals
6
7
8This chapter introduces the manuals available with Vim. Read this to know the
9conditions under which the commands are explained.
10
11|01.1| Two manuals
12|01.2| Vim installed
13|01.3| Using the Vim tutor
14|01.4| Copyright
15
16 Next chapter: |usr_02.txt| The first steps in Vim
17Table of contents: |usr_toc.txt|
18
19==============================================================================
20*01.1* Two manuals
21
22The Vim documentation consists of two parts:
23
241. The User manual
25 Task oriented explanations, from simple to complex. Reads from start to
26 end like a book.
27
282. The Reference manual
29 Precise description of how everything in Vim works.
30
31The notation used in these manuals is explained here: |notation|
32
33
34JUMPING AROUND
35
36The text contains hyperlinks between the two parts, allowing you to quickly
37jump between the description of an editing task and a precise explanation of
38the commands and options used for it. Use these two commands:
39
40 Press CTRL-] to jump to a subject under the cursor.
41 Press CTRL-O to jump back (repeat to go further back).
42
43Many links are in vertical bars, like this: |bars|. An option name, like
44'number', a command in double quotes like ":write" and any other word can also
45be used as a link. Try it out: Move the cursor to CTRL-] and press CTRL-]
46on it.
47
48Other subjects can be found with the ":help" command, see |help.txt|.
49
50==============================================================================
51*01.2* Vim installed
52
53Most of the manuals assume that Vim has been properly installed. If you
54didn't do that yet, or if Vim doesn't run properly (e.g., files can't be found
55or in the GUI the menus do not show up) first read the chapter on
56installation: |usr_90.txt|.
57 *not-compatible*
58The manuals often assume you are using Vim with Vi-compatibility switched
59off. For most commands this doesn't matter, but sometimes it is important,
60e.g., for multi-level undo. An easy way to make sure you are using the right
61setup, copy the example vimrc file. By doing this inside Vim you don't have
62to check out where it is located. How to do this depends on the system you
63are using:
64
65Unix: >
66 :!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc
67MS-DOS, MS-Windows, OS/2: >
68 :!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc
69Amiga: >
70 :!copy $VIMRUNTIME/vimrc_example.vim $VIM/.vimrc
71
72If the file already exists you probably want to keep it.
73
74If you start Vim now, the 'compatible' option should be off. You can check it
75with this command: >
76
77 :set compatible?
78
79If it responds with "nocompatible" you are doing well. If the response is
80"compatible" you are in trouble. You will have to find out why the option is
81still set. Perhaps the file you wrote above is not found. Use this command
82to find out: >
83
84 :scriptnames
85
86If your file is not in the list, check its location and name. If it is in the
87list, there must be some other place where the 'compatible' option is switched
88back on.
89
90For more info see |vimrc| and |compatible-default|.
91
92 Note:
93 This manual is about using Vim in the normal way. There is an
94 alternative called "evim" (easy Vim). This is still Vim, but used in
95 a way that resembles a click-and-type editor like Notepad. It always
96 stays in Insert mode, thus it feels very different. It is not
97 explained in the user manual, since it should be mostly self
98 explanatory. See |evim-keys| for details.
99
100==============================================================================
101*01.3* Using the Vim tutor *tutor* *vimtutor*
102
103Instead of reading the text (boring!) you can use the vimtutor to learn your
104first Vim commands. This is a 30 minute tutorial that teaches the most basic
105Vim functionality hands-on.
106
107On Unix and MS-Windows, if Vim has been properly installed, you can start it
108from the shell:
109>
110 vimtutor
111
112This will make a copy of the tutor file, so that you can edit it without
113the risk of damaging the original.
114 There are a few translated versions of the tutor. To find out if yours is
115available, use the two-letter language code. For French: >
116
117 vimtutor fr
118
119For OpenVMS, if Vim has been properly installed, you can start vimtutor from a
120VMS prompt with: >
121
122 @VIM:vimtutor
123
124Optionally add the two-letter language code as above.
125
126
127On other systems, you have to do a little work:
128
1291. Copy the tutor file. You can do this with Vim (it knows where to find it):
130>
131 vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q'
132<
133 This will write the file "TUTORCOPY" in the current directory. To use a
134translated version of the tutor, append the two-letter language code to the
135filename. For French:
136>
137 vim -u NONE -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q'
138<
1392. Edit the copied file with Vim:
140>
141 vim -u NONE -c "set nocp" TUTORCOPY
142<
143 The extra arguments make sure Vim is started in a good mood.
144
1453. Delete the copied file when you are finished with it:
146>
147 del TUTORCOPY
148<
149==============================================================================
150*01.4* Copyright *manual-copyright*
151
152The Vim user manual and reference manual are Copyright (c) 1988-2003 by Bram
153Moolenaar. This material may be distributed only subject to the terms and
154conditions set forth in the Open Publication License, v1.0 or later. The
155latest version is presently available at:
156 http://www.opencontent.org/opl.shtml
157
158People who contribute to the manuals must agree with the above copyright
159notice.
160 *frombook*
161Parts of the user manual come from the book "Vi IMproved - Vim" by Steve
162Oualline (published by New Riders Publishing, ISBN: 0735710015). The Open
163Publication License applies to this book. Only selected parts are included
164and these have been modified (e.g., by removing the pictures, updating the
165text for Vim 6.0 and fixing mistakes). The omission of the |frombook| tag
166does not mean that the text does not come from the book.
167
168Many thanks to Steve Oualline and New Riders for creating this book and
169publishing it under the OPL! It has been a great help while writing the user
170manual. Not only by providing literal text, but also by setting the tone and
171style.
172
173If you make money through selling the manuals, you are strongly encouraged to
174donate part of the profit to help AIDS victims in Uganda. See |iccf|.
175
176==============================================================================
177
178Next chapter: |usr_02.txt| The first steps in Vim
179
180Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: