blob: d2173a08c8da08f9fc37b0c98532ce58df5621ec [file] [log] [blame]
Bram Moolenaar30ab04e2022-05-14 13:33:50 +01001*usr_toc.txt* For Vim version 8.2. Last change: 2022 May 13
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3 VIM USER MANUAL - by Bram Moolenaar
4
5 Table Of Contents *user-manual*
6
7==============================================================================
8Overview ~
9
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010010Getting Started ~
Bram Moolenaar071d4272004-06-13 20:20:40 +000011|usr_01.txt| About the manuals
12|usr_02.txt| The first steps in Vim
13|usr_03.txt| Moving around
14|usr_04.txt| Making small changes
15|usr_05.txt| Set your settings
16|usr_06.txt| Using syntax highlighting
17|usr_07.txt| Editing more than one file
18|usr_08.txt| Splitting windows
19|usr_09.txt| Using the GUI
20|usr_10.txt| Making big changes
21|usr_11.txt| Recovering from a crash
22|usr_12.txt| Clever tricks
23
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010024Editing Effectively ~
Bram Moolenaar071d4272004-06-13 20:20:40 +000025|usr_20.txt| Typing command-line commands quickly
26|usr_21.txt| Go away and come back
27|usr_22.txt| Finding the file to edit
28|usr_23.txt| Editing other files
29|usr_24.txt| Inserting quickly
30|usr_25.txt| Editing formatted text
31|usr_26.txt| Repeating
32|usr_27.txt| Search commands and patterns
33|usr_28.txt| Folding
34|usr_29.txt| Moving through programs
35|usr_30.txt| Editing programs
36|usr_31.txt| Exploiting the GUI
Bram Moolenaarc01140a2006-03-24 22:21:52 +000037|usr_32.txt| The undo tree
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010039Tuning Vim ~
Bram Moolenaar071d4272004-06-13 20:20:40 +000040|usr_40.txt| Make new commands
41|usr_41.txt| Write a Vim script
42|usr_42.txt| Add new menus
43|usr_43.txt| Using filetypes
44|usr_44.txt| Your own syntax highlighted
Bram Moolenaar65e0d772020-06-14 17:29:55 +020045|usr_45.txt| Select your language (locale)
Bram Moolenaar071d4272004-06-13 20:20:40 +000046
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010047Writing Vim script ~
48|usr_50.txt| Advanced Vim script writing
49|usr_51.txt| Create a plugin
50|usr_52.txt| Write plugins using Vim9 script
51
52Making Vim Run ~
Bram Moolenaar071d4272004-06-13 20:20:40 +000053|usr_90.txt| Installing Vim
54
55
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010056Reference manual ~
Bram Moolenaar910f66f2006-04-05 20:41:53 +000057|reference_toc| More detailed information for all commands
Bram Moolenaarca003e12006-03-17 23:19:38 +000058
Bram Moolenaar30ab04e2022-05-14 13:33:50 +010059The user manual (an older version) is available as a single, ready to print
60HTML and PDF file here:
Bram Moolenaar071d4272004-06-13 20:20:40 +000061 http://vimdoc.sf.net
62
63==============================================================================
64Getting Started ~
65
66Read this from start to end to learn the essential commands.
67
68|usr_01.txt| About the manuals
69 |01.1| Two manuals
70 |01.2| Vim installed
71 |01.3| Using the Vim tutor
72 |01.4| Copyright
73
74|usr_02.txt| The first steps in Vim
75 |02.1| Running Vim for the First Time
76 |02.2| Inserting text
77 |02.3| Moving around
78 |02.4| Deleting characters
79 |02.5| Undo and Redo
80 |02.6| Other editing commands
81 |02.7| Getting out
82 |02.8| Finding help
83
84|usr_03.txt| Moving around
85 |03.1| Word movement
86 |03.2| Moving to the start or end of a line
87 |03.3| Moving to a character
88 |03.4| Matching a paren
89 |03.5| Moving to a specific line
90 |03.6| Telling where you are
91 |03.7| Scrolling around
92 |03.8| Simple searches
93 |03.9| Simple search patterns
94 |03.10| Using marks
95
96|usr_04.txt| Making small changes
97 |04.1| Operators and motions
98 |04.2| Changing text
99 |04.3| Repeating a change
100 |04.4| Visual mode
101 |04.5| Moving text
102 |04.6| Copying text
103 |04.7| Using the clipboard
104 |04.8| Text objects
105 |04.9| Replace mode
106 |04.10| Conclusion
107
108|usr_05.txt| Set your settings
109 |05.1| The vimrc file
110 |05.2| The example vimrc file explained
Bram Moolenaar68e65602019-05-26 21:33:31 +0200111 |05.3| The defaults.vim file explained
112 |05.4| Simple mappings
113 |05.5| Adding a package
114 |05.6| Adding a plugin
115 |05.7| Adding a help file
116 |05.8| The option window
117 |05.9| Often used options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118
119|usr_06.txt| Using syntax highlighting
120 |06.1| Switching it on
121 |06.2| No or wrong colors?
122 |06.3| Different colors
123 |06.4| With colors or without colors
124 |06.5| Printing with colors
125 |06.6| Further reading
126
127|usr_07.txt| Editing more than one file
128 |07.1| Edit another file
129 |07.2| A list of files
130 |07.3| Jumping from file to file
131 |07.4| Backup files
132 |07.5| Copy text between files
133 |07.6| Viewing a file
134 |07.7| Changing the file name
135
136|usr_08.txt| Splitting windows
137 |08.1| Split a window
138 |08.2| Split a window on another file
139 |08.3| Window size
140 |08.4| Vertical splits
141 |08.5| Moving windows
142 |08.6| Commands for all windows
143 |08.7| Viewing differences with vimdiff
144 |08.8| Various
145
146|usr_09.txt| Using the GUI
147 |09.1| Parts of the GUI
148 |09.2| Using the mouse
149 |09.3| The clipboard
150 |09.4| Select mode
151
152|usr_10.txt| Making big changes
153 |10.1| Record and playback commands
154 |10.2| Substitution
155 |10.3| Command ranges
156 |10.4| The global command
157 |10.5| Visual block mode
158 |10.6| Reading and writing part of a file
159 |10.7| Formatting text
160 |10.8| Changing case
161 |10.9| Using an external program
162
163|usr_11.txt| Recovering from a crash
164 |11.1| Basic recovery
165 |11.2| Where is the swap file?
166 |11.3| Crashed or not?
167 |11.4| Further reading
168
169|usr_12.txt| Clever tricks
170 |12.1| Replace a word
171 |12.2| Change "Last, First" to "First Last"
172 |12.3| Sort a list
173 |12.4| Reverse line order
174 |12.5| Count words
175 |12.6| Find a man page
176 |12.7| Trim blanks
177 |12.8| Find where a word is used
178
179==============================================================================
180Editing Effectively ~
181
182Subjects that can be read independently.
183
184|usr_20.txt| Typing command-line commands quickly
185 |20.1| Command line editing
186 |20.2| Command line abbreviations
187 |20.3| Command line completion
188 |20.4| Command line history
189 |20.5| Command line window
190
191|usr_21.txt| Go away and come back
192 |21.1| Suspend and resume
193 |21.2| Executing shell commands
194 |21.3| Remembering information; viminfo
195 |21.4| Sessions
196 |21.5| Views
197 |21.6| Modelines
198
199|usr_22.txt| Finding the file to edit
200 |22.1| The file explorer
201 |22.2| The current directory
202 |22.3| Finding a file
203 |22.4| The buffer list
204
205|usr_23.txt| Editing other files
206 |23.1| DOS, Mac and Unix files
207 |23.2| Files on the internet
208 |23.3| Encryption
209 |23.4| Binary files
210 |23.5| Compressed files
211
212|usr_24.txt| Inserting quickly
213 |24.1| Making corrections
214 |24.2| Showing matches
215 |24.3| Completion
216 |24.4| Repeating an insert
217 |24.5| Copying from another line
218 |24.6| Inserting a register
219 |24.7| Abbreviations
220 |24.8| Entering special characters
221 |24.9| Digraphs
222 |24.10| Normal mode commands
223
224|usr_25.txt| Editing formatted text
225 |25.1| Breaking lines
226 |25.2| Aligning text
227 |25.3| Indents and tabs
228 |25.4| Dealing with long lines
229 |25.5| Editing tables
230
231|usr_26.txt| Repeating
232 |26.1| Repeating with Visual mode
233 |26.2| Add and subtract
234 |26.3| Making a change in many files
235 |26.4| Using Vim from a shell script
236
237|usr_27.txt| Search commands and patterns
238 |27.1| Ignoring case
239 |27.2| Wrapping around the file end
240 |27.3| Offsets
241 |27.4| Matching multiple times
242 |27.5| Alternatives
243 |27.6| Character ranges
244 |27.7| Character classes
245 |27.8| Matching a line break
246 |27.9| Examples
247
248|usr_28.txt| Folding
249 |28.1| What is folding?
250 |28.2| Manual folding
251 |28.3| Working with folds
252 |28.4| Saving and restoring folds
253 |28.5| Folding by indent
254 |28.6| Folding with markers
255 |28.7| Folding by syntax
256 |28.8| Folding by expression
257 |28.9| Folding unchanged lines
Bram Moolenaarfa13eef2013-02-06 17:34:04 +0100258 |28.10| Which fold method to use?
Bram Moolenaar071d4272004-06-13 20:20:40 +0000259
260|usr_29.txt| Moving through programs
261 |29.1| Using tags
262 |29.2| The preview window
263 |29.3| Moving through a program
264 |29.4| Finding global identifiers
265 |29.5| Finding local identifiers
266
267|usr_30.txt| Editing programs
268 |30.1| Compiling
269 |30.2| Indenting C files
270 |30.3| Automatic indenting
271 |30.4| Other indenting
272 |30.5| Tabs and spaces
273 |30.6| Formatting comments
274
275|usr_31.txt| Exploiting the GUI
276 |31.1| The file browser
277 |31.2| Confirmation
278 |31.3| Menu shortcuts
279 |31.4| Vim window position and size
280 |31.5| Various
281
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000282|usr_32.txt| The undo tree
Bram Moolenaar730cde92010-06-27 05:18:54 +0200283 |32.1| Undo up to a file write
284 |32.2| Numbering changes
285 |32.3| Jumping around the tree
286 |32.4| Time travelling
Bram Moolenaarc01140a2006-03-24 22:21:52 +0000287
Bram Moolenaar071d4272004-06-13 20:20:40 +0000288==============================================================================
289Tuning Vim ~
290
291Make Vim work as you like it.
292
293|usr_40.txt| Make new commands
294 |40.1| Key mapping
295 |40.2| Defining command-line commands
296 |40.3| Autocommands
297
298|usr_41.txt| Write a Vim script
299 |41.1| Introduction
300 |41.2| Variables
301 |41.3| Expressions
302 |41.4| Conditionals
303 |41.5| Executing an expression
304 |41.6| Using functions
305 |41.7| Defining a function
Bram Moolenaar7c626922005-02-07 22:01:03 +0000306 |41.8| Lists and Dictionaries
307 |41.9| Exceptions
308 |41.10| Various remarks
Bram Moolenaar071d4272004-06-13 20:20:40 +0000309
310|usr_42.txt| Add new menus
311 |42.1| Introduction
312 |42.2| Menu commands
313 |42.3| Various
314 |42.4| Toolbar and popup menus
315
316|usr_43.txt| Using filetypes
317 |43.1| Plugins for a filetype
318 |43.2| Adding a filetype
319
320|usr_44.txt| Your own syntax highlighted
321 |44.1| Basic syntax commands
322 |44.2| Keywords
323 |44.3| Matches
324 |44.4| Regions
325 |44.5| Nested items
326 |44.6| Following groups
327 |44.7| Other arguments
328 |44.8| Clusters
329 |44.9| Including another syntax file
330 |44.10| Synchronizing
331 |44.11| Installing a syntax file
332 |44.12| Portable syntax file layout
333
Bram Moolenaare7b1ea02020-08-07 19:54:59 +0200334|usr_45.txt| Select your language (locale)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000335 |45.1| Language for Messages
336 |45.2| Language for Menus
337 |45.3| Using another encoding
338 |45.4| Editing files with a different encoding
339 |45.5| Entering language text
340
Bram Moolenaar30ab04e2022-05-14 13:33:50 +0100341==============================================================================
342Writing Vim script ~
343
344|usr_50.txt| TODO
345
346|usr_51.txt| Write plugins
347 |51.1| Writing a generic plugin
348 |51.2| Writing a filetype plugin
349 |51.3| Writing a compiler plugin
350 |51.4| Writing a plugin that loads quickly
351 |51.5| Writing library scripts
352 |51.6| Distributing Vim scripts
353
354|usr_52.txt| Write plugins using Vim9 script
355 |52.1| Introduction
356 |52.2| Variable declarations
357 |52.3| Functions and types
358 |52.4| Using a Vim9 script from legacy script
Bram Moolenaar73fef332020-06-21 22:12:03 +0200359
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360==============================================================================
361Making Vim Run ~
362
363Before you can use Vim.
364
365|usr_90.txt| Installing Vim
366 |90.1| Unix
367 |90.2| MS-Windows
368 |90.3| Upgrading
369 |90.4| Common installation issues
370 |90.5| Uninstalling Vim
371
372==============================================================================
373
Bram Moolenaard473c8c2018-08-11 18:00:22 +0200374Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: