annotate runtime/doc/usr_02.txt @ 29390:f85fcaede57f

Added tag v9.0.0037 for changeset 9ec0dafac7fc5302a4ba443be78a08478517a4bb
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jul 2022 19:00:04 +0200
parents f8116058ca76
children a9b5ffbc0428
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29314
f8116058ca76 release version 9.0
Bram Moolenaar <Bram@vim.org>
parents: 24569
diff changeset
1 *usr_02.txt* For Vim version 9.0. Last change: 2021 Apr 24
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 VIM USER MANUAL - by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 The first steps in Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 This chapter provides just enough information to edit a file with Vim. Not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 well or fast, but you can edit. Take some time to practice with these
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 commands, they form the base for what follows.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 |02.1| Running Vim for the First Time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 |02.2| Inserting text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 |02.3| Moving around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 |02.4| Deleting characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 |02.5| Undo and Redo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 |02.6| Other editing commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 |02.7| Getting out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 |02.8| Finding help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 Next chapter: |usr_03.txt| Moving around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 Previous chapter: |usr_01.txt| About the manuals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 Table of contents: |usr_toc.txt|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 *02.1* Running Vim for the First Time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 To start Vim, enter this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 gvim file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 In UNIX you can type this at any command prompt. If you are running Microsoft
18972
130acb903dbe Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
33 Windows, open a Command Prompt and enter the command.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 In either case, Vim starts editing a file called file.txt. Because this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 is a new file, you get a blank window. This is what your screen will look
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 like:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 |# |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 |"file.txt" [New file] |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 +---------------------------------------+
24387
5c98ea5f5d6e Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 19180
diff changeset
46 ('#' is the cursor position.)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 The tilde (~) lines indicate lines not in the file. In other words, when Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 runs out of file to display, it displays tilde lines. At the bottom of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 screen, a message line indicates the file is named file.txt and shows that you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 are creating a new file. The message information is temporary and other
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 information overwrites it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 THE VIM COMMAND
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 The gvim command causes the editor to create a new window for editing. If you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 use this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 vim file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 the editing occurs inside your command window. In other words, if you are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 running inside an xterm, the editor uses your xterm window. If you are using
18972
130acb903dbe Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
64 an MS-Windows command prompt window, the editing occurs inside this window.
130acb903dbe Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
65 The text in the window will look the same for both versions, but with gvim you
130acb903dbe Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
66 have extra features, like a menu bar. More about that later.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 *02.2* Inserting text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 The Vim editor is a modal editor. That means that the editor behaves
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 differently, depending on which mode you are in. The two basic modes are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 called Normal mode and Insert mode. In Normal mode the characters you type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 are commands. In Insert mode the characters are inserted as text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 Since you have just started Vim it will be in Normal mode. To start Insert
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 mode you type the "i" command (i for Insert). Then you can enter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 the text. It will be inserted into the file. Do not worry if you make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 mistakes; you can correct them later. To enter the following programmer's
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 limerick, this is what you type: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 iA very intelligent turtle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 Found programming UNIX a hurdle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 After typing "turtle" you press the <Enter> key to start a new line. Finally
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 you press the <Esc> key to stop Insert mode and go back to Normal mode. You
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 now have two lines of text in your Vim window:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 |A very intelligent turtle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 |Found programming UNIX a hurdle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 | |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 WHAT IS THE MODE?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 To be able to see what mode you are in, type this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 :set showmode
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 You will notice that when typing the colon Vim moves the cursor to the last
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 line of the window. That's where you type colon commands (commands that start
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 with a colon). Finish this command by pressing the <Enter> key (all commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 that start with a colon are finished this way).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 Now, if you type the "i" command Vim will display --INSERT-- at the bottom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 of the window. This indicates you are in Insert mode.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 |A very intelligent turtle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 |Found programming UNIX a hurdle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 |-- INSERT -- |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 If you press <Esc> to go back to Normal mode the last line will be made blank.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 GETTING OUT OF TROUBLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 One of the problems for Vim novices is mode confusion, which is caused by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 forgetting which mode you are in or by accidentally typing a command that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 switches modes. To get back to Normal mode, no matter what mode you are in,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 press the <Esc> key. Sometimes you have to press it twice. If Vim beeps back
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 at you, you already are in Normal mode.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 *02.3* Moving around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 After you return to Normal mode, you can move around by using these keys:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 h left *hjkl*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 j down
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 k up
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 l right
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 At first, it may appear that these commands were chosen at random. After all,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 who ever heard of using l for right? But actually, there is a very good
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 reason for these choices: Moving the cursor is the most common thing you do in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 an editor, and these keys are on the home row of your right hand. In other
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 words, these commands are placed where you can type them the fastest
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 (especially when you type with ten fingers).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 Note:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 You can also move the cursor by using the arrow keys. If you do,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 however, you greatly slow down your editing because to press the arrow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 keys, you must move your hand from the text keys to the arrow keys.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 Considering that you might be doing it hundreds of times an hour, this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 can take a significant amount of time.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 Also, there are keyboards which do not have arrow keys, or which
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 locate them in unusual places; therefore, knowing the use of the hjkl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 keys helps in those situations.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 One way to remember these commands is that h is on the left, l is on the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 right and j points down. In a picture: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 k
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 h l
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 j
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 The best way to learn these commands is by using them. Use the "i" command to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 insert some more lines of text. Then use the hjkl keys to move around and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 insert a word somewhere. Don't forget to press <Esc> to go back to Normal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 mode. The |vimtutor| is also a nice way to learn by doing.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 For Japanese users, Hiroshi Iwatani suggested using this:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 Komsomolsk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 ^
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 Huan Ho <--- ---> Los Angeles
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 (Yellow river) |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 v
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 Java (the island, not the programming language)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 *02.4* Deleting characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 To delete a character, move the cursor over it and type "x". (This is a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 throwback to the old days of the typewriter, when you deleted things by typing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 xxxx over them.) Move the cursor to the beginning of the first line, for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 example, and type xxxxxxx (seven x's) to delete "A very ". The result should
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 look like this:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 |intelligent turtle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 |Found programming UNIX a hurdle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 | |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 Now you can insert new text, for example by typing: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 iA young <Esc>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 This begins an insert (the i), inserts the words "A young", and then exits
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 insert mode (the final <Esc>). The result:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 |A young intelligent turtle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 |Found programming UNIX a hurdle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 | |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 DELETING A LINE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 To delete a whole line use the "dd" command. The following line will
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 then move up to fill the gap:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 |Found programming UNIX a hurdle |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 |~ |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 | |
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 +---------------------------------------+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 DELETING A LINE BREAK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 In Vim you can join two lines together, which means that the line break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 between them is deleted. The "J" command does this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 Take these two lines:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 A young intelligent ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 Move the cursor to the first line and press "J":
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 A young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 *02.5* Undo and Redo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 Suppose you delete too much. Well, you can type it in again, but an easier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 way exists. The "u" command undoes the last edit. Take a look at this in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 action: After using "dd" to delete the first line, "u" brings it back.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 Another one: Move the cursor to the A in the first line:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 A young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 Now type xxxxxxx to delete "A young". The result is as follows:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 Type "u" to undo the last delete. That delete removed the g, so the undo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 restores the character.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 g intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
257 The next "u" command restores the next-to-last character deleted:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 ng intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
261 The next "u" command gives you the u, and so on:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 ung intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 oung intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 A young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 Note:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 If you type "u" twice, and the result is that you get the same text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 back, you have Vim configured to work Vi compatible. Look here to fix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 this: |not-compatible|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 This text assumes you work "The Vim Way". You might prefer to use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 the good old Vi way, but you will have to watch out for small
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 differences in the text then.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 REDO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 If you undo too many times, you can press CTRL-R (redo) to reverse the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 preceding command. In other words, it undoes the undo. To see this in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 action, press CTRL-R twice. The character A and the space after it disappear:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 young intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 There's a special version of the undo command, the "U" (undo line) command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 The undo line command undoes all the changes made on the last line that was
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 edited. Typing this command twice cancels the preceding "U".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 A very intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 xxxx Delete very
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 A intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 xxxxxx Delete turtle
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 A intelligent ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 Restore line with "U"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 A very intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 Undo "U" with "u"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 A intelligent ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 The "U" command is a change by itself, which the "u" command undoes and CTRL-R
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 redoes. This might be a bit confusing. Don't worry, with "u" and CTRL-R you
2281
e41433ea71df Added ":earlier 1f" and ":later 1f".
Bram Moolenaar <bram@vim.org>
parents: 2154
diff changeset
304 can go to any of the situations you had. More about that in section |32.2|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 *02.6* Other editing commands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 Vim has a large number of commands to change the text. See |Q_in| and below.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 Here are a few often used ones.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 APPENDING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 The "i" command inserts a character before the character under the cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 That works fine; but what happens if you want to add stuff to the end of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 line? For that you need to insert text after the cursor. This is done with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 the "a" (append) command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 For example, to change the line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 and that's not saying much for the turtle. ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 and that's not saying much for the turtle!!! ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 move the cursor over to the dot at the end of the line. Then type "x" to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 delete the period. The cursor is now positioned at the end of the line on the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 e in turtle. Now type >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 a!!!<Esc>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 to append three exclamation points after the e in turtle:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 and that's not saying much for the turtle!!! ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 OPENING UP A NEW LINE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 The "o" command creates a new, empty line below the cursor and puts Vim in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 Insert mode. Then you can type the text for the new line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 Suppose the cursor is somewhere in the first of these two lines:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 A very intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 Found programming UNIX a hurdle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 If you now use the "o" command and type new text: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 oThat liked using Vim<Esc>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 The result is:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 A very intelligent turtle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 That liked using Vim ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 Found programming UNIX a hurdle ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 The "O" command (uppercase) opens a line above the cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 USING A COUNT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 Suppose you want to move up nine lines. You can type "kkkkkkkkk" or you can
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 enter the command "9k". In fact, you can precede many commands with a number.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 Earlier in this chapter, for instance, you added three exclamation points to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 the end of a line by typing "a!!!<Esc>". Another way to do this is to use the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 command "3a!<Esc>". The count of 3 tells the command that follows to triple
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 its effect. Similarly, to delete three characters, use the command "3x". The
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 count always comes before the command it applies to.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 *02.7* Getting out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 To exit, use the "ZZ" command. This command writes the file and exits.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 Note:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 Unlike many other editors, Vim does not automatically make a backup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 file. If you type "ZZ", your changes are committed and there's no
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 turning back. You can configure the Vim editor to produce backup
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
377 files; see |07.4|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 DISCARDING CHANGES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 Sometimes you will make a sequence of changes and suddenly realize you were
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 better off before you started. Not to worry; Vim has a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 quit-and-throw-things-away command. It is: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386 :q!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 Don't forget to press <Enter> to finish the command.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 For those of you interested in the details, the three parts of this command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 are the colon (:), which enters Command-line mode; the q command, which tells
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 the editor to quit; and the override command modifier (!).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 The override command modifier is needed because Vim is reluctant to throw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 away changes. If you were to just type ":q", Vim would display an error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395 message and refuse to exit:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 E37: No write since last change (use ! to override) ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 By specifying the override, you are in effect telling Vim, "I know that what
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
400 I'm doing looks stupid, but I really want to do this."
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 If you want to continue editing with Vim: The ":e!" command reloads the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 original version of the file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 *02.8* Finding help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 Everything you always wanted to know can be found in the Vim help files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 Don't be afraid to ask!
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
410
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
411 If you know what you are looking for, it is usually easier to search for it
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
412 using the help system, instead of using Google. Because the subjects follow
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
413 a certain style guide.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
414
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
415 Also the help has the advantage of belonging to your particular Vim version.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
416 You won't see help for commands added later. These would not work for you.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
417
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
418 To get generic help use this command: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 :help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 You could also use the first function key <F1>. If your keyboard has a <Help>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 key it might work as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 If you don't supply a subject, ":help" displays the general help window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 The creators of Vim did something very clever (or very lazy) with the help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 system: They made the help window a normal editing window. You can use all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 the normal Vim commands to move through the help information. Therefore h, j,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 k, and l move left, down, up and right.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 To get out of the help window, use the same command you use to get out of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 the editor: "ZZ". This will only close the help window, not exit Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 As you read the help text, you will notice some text enclosed in vertical bars
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 (for example, |help|). This indicates a hyperlink. If you position the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 cursor anywhere between the bars and press CTRL-] (jump to tag), the help
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
435 system takes you to the indicated subject. (For reasons not discussed here,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 the Vim terminology for a hyperlink is tag. So CTRL-] jumps to the location
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 of the tag given by the word under the cursor.)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 After a few jumps, you might want to go back. CTRL-T (pop tag) takes you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 back to the preceding position. CTRL-O (jump to older position) also works
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 nicely here.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 At the top of the help screen, there is the notation *help.txt*. This name
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 between "*" characters is used by the help system to define a tag (hyperlink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 destination).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 See |29.1| for details about using tags.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 To get help on a given subject, use the following command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 :help {subject}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 To get help on the "x" command, for example, enter the following: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 :help x
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 To find out how to delete text, use this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 :help deleting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 To get a complete index of all Vim commands, use the following command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 :help index
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 When you need to get help for a control character command (for example,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 CTRL-A), you need to spell it with the prefix "CTRL-". >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 :help CTRL-A
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 The Vim editor has many different modes. By default, the help system displays
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 the normal-mode commands. For example, the following command displays help
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 for the normal-mode CTRL-H command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 :help CTRL-H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 To identify other modes, use a mode prefix. If you want the help for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 insert-mode version of a command, use "i_". For CTRL-H this gives you the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 following command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 :help i_CTRL-H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 When you start the Vim editor, you can use several command-line arguments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 These all begin with a dash (-). To find what the -t argument does, for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 example, use the command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 :help -t
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 The Vim editor has a number of options that enable you to configure and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 customize the editor. If you want help for an option, you need to enclose it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 in single quotation marks. To find out what the 'number' option does, for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 example, use the following command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 :help 'number'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
492 The table with all mode prefixes can be found below: |help-summary|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493
236
4707450c2b33 updated for version 7.0066
vimboss
parents: 7
diff changeset
494 Special keys are enclosed in angle brackets. To find help on the up-arrow key
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 in Insert mode, for instance, use this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 :help i_<Up>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 If you see an error message that you don't understand, for example:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 E37: No write since last change (use ! to override) ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 You can use the error ID at the start to find help about it: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 :help E37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
507
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
508 Summary: *help-summary* >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
509
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
510 1) Use Ctrl-D after typing a topic and let Vim show all available topics.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
511 Or press Tab to complete: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
512 :help some<Tab>
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
513 < More information on how to use the help: >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
514 :help helphelp
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
515
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
516 2) Follow the links in bars to related help. You can go from the detailed
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
517 help to the user documentation, which describes certain commands more from
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
518 a user perspective and less detailed. E.g. after: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
519 :help pattern.txt
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
520 < You can see the user guide topics |03.9| and |usr_27.txt| in the
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
521 introduction.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
522
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
523 3) Options are enclosed in single apostrophes. To go to the help topic for the
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
524 list option: >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
525 :help 'list'
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
526 < If you only know you are looking for a certain option, you can also do: >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
527 :help options.txt
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
528 < to open the help page which describes all option handling and then search
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
529 using regular expressions, e.g. textwidth.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
530 Certain options have their own namespace, e.g.: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
531 :help cpo-<letter>
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
532 < for the corresponding flag of the 'cpoptions' settings, substitute <letter>
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
533 by a specific flag, e.g.: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
534 :help cpo-;
24569
e3ec2ec8841a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24387
diff changeset
535 < And for the 'guioptions' flags: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
536 :help go-<letter>
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
537
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
538 4) Normal mode commands do not have a prefix. To go to the help page for the
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
539 "gt" command: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
540 :help gt
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
541
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
542 5) Insert mode commands start with i_. Help for deleting a word: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
543 :help i_CTRL-W
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
544
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
545 6) Visual mode commands start with v_. Help for jumping to the other side of
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
546 the Visual area: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
547 :help v_o
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
548
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
549 7) Command line editing and arguments start with c_. Help for using the
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
550 command argument %: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
551 :help c_%
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
552
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
553 8) Ex-commands always start with ":", so to go to the ":s" command help: >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
554 :help :s
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
555
11160
d0a20101ecb2 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
556 9) Commands specifically for debugging start with ">". To go to the help
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
557 for the "cont" debug command: >
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
558 :help >cont
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
559
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
560 10) Key combinations. They usually start with a single letter indicating
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
561 the mode for which they can be used. E.g.: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
562 :help i_CTRL-X
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
563 < takes you to the family of CTRL-X commands for insert mode which can be
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
564 used to auto-complete different things. Note, that certain keys will
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
565 always be written the same, e.g. Control will always be CTRL.
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
566 For normal mode commands there is no prefix and the topic is available at
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
567 :h CTRL-<Letter>. E.g. >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
568 :help CTRL-W
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
569 < In contrast >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
570 :help c_CTRL-R
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
571 < will describe what the CTRL-R does when entering commands in the Command
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
572 line and >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
573 :help v_CTRL-A
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
574 < talks about incrementing numbers in visual mode and >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
575 :help g_CTRL-A
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
576 < talks about the "g<C-A>" command (e.g. you have to press "g" then
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
577 <CTRL-A>). Here the "g" stands for the normal command "g" which always
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
578 expects a second key before doing something similar to the commands
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
579 starting with "z".
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
580
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
581 11) Regexp items always start with /. So to get help for the "\+" quantifier
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
582 in Vim regexes: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
583 :help /\+
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
584 < If you need to know everything about regular expressions, start reading
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
585 at: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
586 :help pattern.txt
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
587
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
588 12) Registers always start with "quote". To find out about the special ":"
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
589 register: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
590 :help quote:
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
591
10942
e05695e59f6d patch 8.0.0360: sometimes VimL is used instead of "Vim script"
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
592 13) Vim script is available at >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
593 :help eval.txt
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
594 < Certain aspects of the language are available at :h expr-X where "X" is a
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
595 single letter. E.g. >
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
596 :help expr-!
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
597 < will take you to the topic describing the "!" (Not) operator for Vim
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
598 script.
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
599 Also important is >
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
600 :help function-list
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
601 < to find a short description of all functions available. Help topics for
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
602 Vim script functions always include the "()", so: >
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
603 :help append()
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
604 < talks about the append Vim script function rather than how to append text
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
605 in the current buffer.
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
606
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
607 14) Mappings are talked about in the help page :h |map.txt|. Use >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
608 :help mapmode-i
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
609 < to find out about the |:imap| command. Also use :map-topic
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
610 to find out about certain subtopics particular for mappings. e.g: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
611 :help :map-local
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
612 < for buffer-local mappings or >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
613 :help map-bar
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
614 < for how the '|' is handled in mappings.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
615
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
616 15) Command definitions are talked about :h command-topic, so use >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
617 :help command-bar
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
618 < to find out about the '!' argument for custom commands.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
619
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
620 16) Window management commands always start with CTRL-W, so you find the
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
621 corresponding help at :h CTRL-W_letter. E.g. >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
622 :help CTRL-W_p
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
623 < for moving the previous accessed window. You can also access >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
624 :help windows.txt
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
625 < and read your way through if you are looking for window handling
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
626 commands.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
627
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
628 17) Use |:helpgrep| to search in all help pages (and also of any installed
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
629 plugins). See |:helpgrep| for how to use it.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
630 To search for a topic: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
631 :helpgrep topic
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
632 < This takes you to the first match. To go to the next one: >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
633 :cnext
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
634 < All matches are available in the quickfix window which can be opened
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
635 with: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
636 :copen
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
637 < Move around to the match you like and press Enter to jump to that help.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
638
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
639 18) The user manual. This describes help topics for beginners in a rather
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
640 friendly way. Start at |usr_toc.txt| to find the table of content (as you
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
641 might have guessed): >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
642 :help usr_toc.txt
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
643 < Skim over the contents to find interesting topics. The "Digraphs" and
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
644 "Entering special characters" items are in chapter 24, so to go to that
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
645 particular help page: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
646 :help usr_24.txt
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
647 < Also if you want to access a certain chapter in the help, the chapter
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
648 number can be accessed directly like this: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
649 :help 10.1
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
650 < which goes to chapter 10.1 in |usr_10.txt| and talks about recording
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
651 macros.
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
652
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
653 19) Highlighting groups. Always start with hl-groupname. E.g. >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
654 :help hl-WarningMsg
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
655 < talks about the WarningMsg highlighting group.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
656
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
657 20) Syntax highlighting is namespaced to :syn-topic. E.g. >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
658 :help :syn-conceal
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
659 < talks about the conceal argument for the ":syn" command.
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
660
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
661 21) Quickfix commands usually start with :c while location list commands
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
662 usually start with :l
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
663
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
664 22) Autocommand events can be found by their name: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
665 :help BufWinLeave
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
666 < To see all possible events: >
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 10942
diff changeset
667 :help autocommand-events
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
668
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
669 23) Command-line switches always start with "-". So for the help of the -f
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
670 command switch of Vim use: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
671 :help -f
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
672
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
673 24) Optional features always start with "+". To find out about the
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
674 conceal feature use: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
675 :help +conceal
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
676
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
677 25) Documentation for included filetype specific functionality is usually
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
678 available in the form ft-<filetype>-<functionality>. So >
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
679 :help ft-c-syntax
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
680 < talks about the C syntax file and the option it provides. Sometimes,
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
681 additional sections for omni completion >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
682 :help ft-php-omni
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
683 < or filetype plugins >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
684 :help ft-tex-plugin
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
685 < are available.
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
686
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 7597
diff changeset
687 26) Error and Warning codes can be looked up directly in the help. So >
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
688 :help E297
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
689 < takes you exactly to the description of the swap error message and >
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
690 :help W10
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
691 < talks about the warning "Changing a readonly file".
18719
99586852c2db Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 14519
diff changeset
692 Sometimes, however, those error codes are not described, but rather are
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
693 listed at the Vim command that usually causes this. So: >
19180
8edf0aeb71b9 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
694 :help E128
7597
3012eaddb6b2 commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents: 6741
diff changeset
695 < takes you to the |:function| command
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
696
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
697
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
698 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
700 Next chapter: |usr_03.txt| Moving around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701
14519
5c5908e81e93 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
702 Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: