robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqvim-patch:ecba601: runtime(doc): fix a few small problems (#39969)daf2506a6d

master
25.4 KiB741 linesraw
1*usr_30.txt*	Nvim
2
3
4		     VIM USER MANUAL	by Bram Moolenaar
5
6
7			      Editing programs
8
9
10Vim has various commands that aid in writing computer programs.  Compile a
11program and directly jump to reported errors.  Automatically set the indent
12for many languages and format comments.
13
14|30.1|	Compiling
15|30.2|	Indenting C files
16|30.3|	Automatic indenting
17|30.4|	Other indenting
18|30.5|	Tabs and spaces
19|30.6|	Formatting comments
20
21     Next chapter: |usr_31.txt|  Exploiting the GUI
22 Previous chapter: |usr_29.txt|  Moving through programs
23Table of contents: |usr_toc.txt|
24
25==============================================================================
26*30.1*	Compiling
27
28Vim has a set of so called "quickfix" commands.  They enable you to compile a
29program from within Vim and then go through the errors generated and fix them
30(hopefully).  You can then recompile and fix any new errors that are found
31until finally your program compiles without any error.
32
33The following command runs the program "make" (supplying it with any argument
34you give) and captures the results: >
35
36	:make {arguments}
37
38If errors were generated, they are captured and the editor positions you where
39the first error occurred.
40   Take a look at an example ":make" session.  (Typical :make sessions
41generate far more errors and fewer stupid ones.)  After typing ":make" the
42screen looks like this:
43
44	:!make | &tee /tmp/vim215953.err ~
45	gcc -g -Wall -o prog main.c sub.c ~
46	main.c: In function 'main': ~
47	main.c:6: too many arguments to function 'do_sub' ~
48	main.c: At top level: ~
49	main.c:10: parse error before '}' ~
50	make: *** [prog] Error 1 ~
51
52	2 returned ~
53	"main.c" 11L, 111C ~
54	(3 of 6): too many arguments to function 'do_sub' ~
55	Press ENTER or type command to continue ~
56
57From this you can see that you have errors in the file "main.c".  When you
58press <Enter>, Vim displays the file "main.c", with the cursor positioned on
59line 6, the first line with an error.  You did not need to specify the file or
60the line number, Vim knew where to go by looking in the error messages.
61>
62		+---------------------------------------------------+
63		|int main()					    |
64		|{						    |
65		|	int i=3;				    |
66      cursor -> |	do_sub("foo");				    |
67		|	++i;					    |
68		|	return (0);				    |
69		|}						    |
70		|}						    |
71		| ~						    |
72		|(3 of 12): too many arguments to function 'do_sub' |
73		+---------------------------------------------------+
74<
75The following command goes to where the next error occurs: >
76
77	:cnext
78
79Vim jumps to line 10, the last line in the file, where there is an extra '}'.
80   When there is not enough room, Vim will shorten the error message.  To see
81the whole message use: >
82
83	:cc
84
85You can get an overview of all the error messages with the ":clist" command.
86The output looks like this: >
87
88	:clist
89<	3 main.c: 6:too many arguments to function 'do_sub' ~
90	5 main.c: 10:parse error before '}' ~
91
92Only the lines where Vim recognized a file name and line number are listed
93here.  It assumes those are the interesting lines and the rest is just boring
94messages.  However, sometimes unrecognized lines do contain something you want
95to see.  Output from the linker, for example, about an undefined function.
96To see all the messages add a "!" to the command: >
97
98	:clist!
99<	1 gcc -g -Wall -o prog main.c sub.c ~
100	2 main.c: In function 'main': ~
101	3 main.c:6: too many arguments to function 'do_sub' ~
102	4 main.c: At top level: ~
103	5 main.c:10: parse error before '}' ~
104	6 make: *** [prog] Error 1 ~
105
106Vim will highlight the current error.  To go back to the previous error, use:
107>
108	:cprevious
109
110Other commands to move around in the error list:
111
112	:cfirst		to first error
113	:clast		to last error
114	:cc 3		to error nr 3
115
116
117USING ANOTHER COMPILER
118
119The name of the program to run when the ":make" command is executed is defined
120by the 'makeprg' option.  Usually this is set to "make", but Visual C++ users
121should set this to "nmake" by executing the following command: >
122
123	:set makeprg=nmake
124
125You can also include arguments in this option.  Special characters need to
126be escaped with a backslash.  Example: >
127
128	:set makeprg=nmake\ -f\ project.mak
129
130You can include special Vim keywords in the command specification.  The %
131character expands to the name of the current file.  So if you execute the
132command: >
133	:set makeprg=make\ %:S
134
135When you are editing main.c, then ":make" executes the following command: >
136
137	make main.c
138
139This is not too useful, so you will refine the command a little and use the :r
140(root) modifier: >
141
142	:set makeprg=make\ %:r:S.o
143
144Now the command executed is as follows: >
145
146	make main.o
147
148More about these modifiers here: |filename-modifiers|.
149
150
151OLD ERROR LISTS
152
153Suppose you ":make" a program.  There is a warning message in one file and an
154error message in another.  You fix the error and use ":make" again to check if
155it was really fixed.  Now you want to look at the warning message.  It doesn't
156show up in the last error list, since the file with the warning wasn't
157compiled again.  You can go back to the previous error list with: >
158
159	:colder
160
161Then use ":clist" and ":cc {nr}" to jump to the place with the warning.
162   To go forward to the next error list: >
163
164	:cnewer
165
166Vim remembers ten error lists.
167
168
169SWITCHING COMPILERS
170
171You have to tell Vim what format the error messages are that your compiler
172produces.  This is done with the 'errorformat' option.  The syntax of this
173option is quite complicated and it can be made to fit almost any compiler.
174You can find the explanation here: |errorformat|.
175
176You might be using various different compilers.  Setting the 'makeprg' option,
177and especially the 'errorformat' each time is not easy.  Vim offers a simple
178method for this.  For example, to switch to using the Microsoft Visual C++
179compiler: >
180
181	:compiler msvc
182
183This will find the Vim script for the "msvc" compiler and set the appropriate
184options.
185   You can write your own compiler files.  See |write-compiler-plugin|.
186
187
188OUTPUT REDIRECTION
189
190The ":make" command redirects the output of the executed program to an error
191file.  How this works depends on various things, such as the 'shell'.  If your
192":make" command doesn't capture the output, check the 'makeef' and
193'shellpipe' options.  The 'shellquote' and 'shellxquote' options might also
194matter.
195
196In case you can't get ":make" to redirect the file for you, an alternative is
197to compile the program in another window and redirect the output into a file.
198Then have Vim read this file with: >
199
200	:cfile {filename}
201
202Jumping to errors will work like with the ":make" command.
203
204==============================================================================
205*30.2*	Indenting C style text
206
207A program is much easier to understand when the lines have been properly
208indented.  Vim offers various ways to make this less work.  For C or C style
209programs like Java or C++, set the 'cindent' option.  Vim knows a lot about C
210programs and will try very hard to automatically set the indent for you.  Set
211the 'shiftwidth' option to the amount of spaces you want for a deeper level.
212Four spaces will work fine.  One ":set" command will do it: >
213
214	:set cindent shiftwidth=4
215
216With this option enabled, when you type something such as "if (x)", the next
217line will automatically be indented an additional level.
218
219				    if (flag)
220	Automatic indent   --->		do_the_work();
221	Automatic unindent <--	    if (other_flag) {
222	Automatic indent   --->		do_file();
223	keep indent			do_some_more();
224	Automatic unindent <--	    }
225
226When you type something in curly braces ({}), the text will be indented at the
227start and unindented at the end.  The unindenting will happen after typing the
228'}', since Vim can't guess what you are going to type.
229
230One side effect of automatic indentation is that it helps you catch errors in
231your code early.  When you type a } to finish a function, only to find that
232the automatic indentation gives it more indent than what you expected, there
233is probably a } missing.  Use the "%" command to find out which { matches the
234} you typed.
235   A missing ) and ; also cause extra indent.  Thus if you get more white
236space than you would expect, check the preceding lines.
237
238When you have code that is badly formatted, or you inserted and deleted lines,
239you need to re-indent the lines.  The "=" operator does this.  The simplest
240form is: >
241
242	==
243
244This indents the current line.  Like with all operators, there are three ways
245to use it.  In Visual mode "=" indents the selected lines.  A useful text
246object is "a{".  This selects the current {} block.  Thus, to re-indent the
247code block the cursor is in: >
248
249	=a{
250
251If you have really badly indented code, you can re-indent the whole file with:
252>
253	gg=G
254
255However, don't do this in files that have been carefully indented manually.
256The automatic indenting does a good job, but in some situations you might want
257to overrule it.
258
259
260SETTING INDENT STYLE
261
262Different people have different styles of indentation.  By default Vim does a
263pretty good job of indenting in a way that 90% of programmers do.  There are
264different styles, however; so if you want to, you can customize the
265indentation style with the 'cinoptions' option.
266   By default 'cinoptions' is empty and Vim uses the default style.  You can
267add various items where you want something different.  For example, to make
268curly braces be placed like this:
269
270	if (flag) ~
271	  { ~
272	    i = 8; ~
273	    j = 0; ~
274	  } ~
275
276Use this command: >
277
278	:set cinoptions+={2
279
280There are many of these items.  See |cinoptions-values|.
281
282==============================================================================
283*30.3*	Automatic indenting
284
285You don't want to switch on the 'cindent' option manually every time you edit
286a C file.  This is how you make it work automatically: >
287
288	:filetype indent on
289
290Actually, this does a lot more than switching on 'cindent' for C files.  First
291of all, it enables detecting the type of a file.  That's the same as what is
292used for syntax highlighting.
293   When the filetype is known, Vim will search for an indent file for this
294type of file.  The Vim distribution includes a number of these for various
295programming languages.  This indent file will then prepare for automatic
296indenting specifically for this file.
297
298If you don't like the automatic indenting, you can switch it off again: >
299
300	:filetype indent off
301
302If you don't like the indenting for one specific type of file, this is how you
303avoid it.  Create a file with just this one line: >
304
305	:let b:did_indent = 1
306
307Now you need to write this in a file with a specific name:
308
309	{directory}/indent/{filetype}.vim
310
311The {filetype} is the name of the file type, such as "cpp" or "java".  You can
312see the exact name that Vim detected with this command: >
313
314	:set filetype
315
316In this file the output is:
317
318	filetype=help ~
319
320Thus you would use "help" for {filetype}.
321   For the {directory} part you need to use your runtime directory.  Look at
322the output of this command: >
323
324	set runtimepath
325
326Now use the first item, the name before the first comma.  Thus if the output
327looks like this:
328
329	runtimepath=~/.config/nvim,/usr/local/share/vim/vim60/runtime,~/.config/nvim/after ~
330
331You use "~/.config/nvim" for {directory}.  Then the resulting file name is:
332
333	~/.config/nvim/indent/help.vim ~
334
335Instead of switching the indenting off, you could write your own indent file.
336How to do that is explained here: |indent-expression|.
337
338==============================================================================
339*30.4*	Other indenting
340
341The simplest form of automatic indenting is with the 'autoindent' option.
342It uses the indent from the previous line.  A bit smarter is the 'smartindent'
343option.  This is useful for languages where no indent file is available.
344'smartindent' is not as smart as 'cindent', but smarter than 'autoindent'.
345   With 'smartindent' set, an extra level of indentation is added for each {
346and removed for each }.  An extra level of indentation will also be added for
347any of the words in the 'cinwords' option.  Lines that begin with # are
348treated specially: all indentation is removed.  This is done so that
349preprocessor directives will all start in column 1.  The indentation is
350restored for the next line.
351
352
353CORRECTING INDENTS
354
355When you are using 'autoindent' or 'smartindent' to get the indent of the
356previous line, there will be many times when you need to add or remove one
357'shiftwidth' worth of indent.  A quick way to do this is using the CTRL-D and
358CTRL-T commands in Insert mode.
359   For example, you are typing a shell script that is supposed to look like
360this:
361
362	if test -n a; then ~
363	   echo a ~
364	   echo "-------" ~
365	fi ~
366
367Start off by setting these options: >
368
369	:set autoindent shiftwidth=3
370
371You start by typing the first line, <Enter> and the start of the second line:
372
373	if test -n a; then ~
374	echo ~
375
376Now you see that you need an extra indent.  Type CTRL-T.  The result:
377
378	if test -n a; then ~
379	   echo ~
380
381The CTRL-T command, in Insert mode, adds one 'shiftwidth' to the indent, no
382matter where in the line you are.
383   You continue typing the second line, <Enter> and the third line.  This time
384the indent is OK.  Then <Enter> and the last line.  Now you have this:
385
386	if test -n a; then ~
387	   echo a ~
388	   echo "-------" ~
389	   fi ~
390
391To remove the superfluous indent in the last line press CTRL-D.  This deletes
392one 'shiftwidth' worth of indent, no matter where you are in the line.
393   When you are in Normal mode, you can use the ">>" and "<<" commands to
394shift lines.  ">" and "<" are operators, thus you have the usual three ways to
395specify the lines you want to indent.  A useful combination is: >
396
397	>i{
398
399This adds one indent to the current block of lines, inside {}.  The { and }
400lines themselves are left unmodified.  ">a{" includes them.  In this example
401the cursor is on "printf":
402
403	original text		after ">i{"		after ">a{"
404
405	if (flag)		if (flag)		if (flag) ~
406	{			{			    { ~
407	printf("yes");		    printf("yes");	    printf("yes"); ~
408	flag = 0;		    flag = 0;		    flag = 0;  ~
409	}			}			    } ~
410
411==============================================================================
412*30.5*	Tabs and spaces
413
414A QUICK HISTORY OF THE RATIONALE BEHIND TABS
415
416`vi` (the ancestor of Vim) was created by Bill Joy.  At the time, he was using
417a PDP-11 with limited memory and I/O operation capabilities.  Back then, it
418was common to optimize the size of source code with the following trick.
419  The ASCII table was first designed to remotely control teleprinters.  When
420control character 9 (the Horizontal Tab, caret notation: ^I) was sent to a
421teleprinter, it would move the carriage to the next tab stop.  Assuming tab
422stops were separated by 8 columns (a typical standard), this means that a
423single control character could produce the same visual effect as up to 8 space
424characters.  For example, the following two lines will display identically >
425
426	1234^I9
427	1234    9
428
429Using the <Tab> key was also faster than typing <Space> several times; the
430same was true for <BS>.
431
432
433THE ISSUE WITH TABS AND INDENTATION
434
435In Vim, the number of columns between two (virtual) horizontal tab stops
436is controlled by 'tabstop' and is set to eight by default.  Although you can
437change it, you quickly run into trouble later.  Other programs won't know what
438tabstop value you used.  They probably use the default value of eight, and
439your text suddenly looks very different.  Also, most printers use a fixed
440tabstop value of eight.  Thus it's best to keep 'tabstop' alone; if you edit a
441file which was written with a different tabstop setting, see |25.3| for how
442to fix that.
443   For indenting lines in a program, using a multiple of eight columns makes
444you quickly run into the right border of the window.  Using a single space
445doesn't provide enough visual difference.  Many people prefer to use four
446spaces, a good compromise.
447   Since a tab character at the beginning of a line is visually represented
448as eight spaces and you want to use an indent of four spaces, you can't use a
449tab character to make your indent.
450  To remedy this, `vi` had the 'shiftwidth' option.  When set to 4, on a new
451line, pressing <C-t> in Insert mode would indent the line by 4 spaces,
452a result impossible to get with the <Tab> key and 'tabstop' set to 8.
453 To optimize space, `vi` would also silently remove packs of spaces and replace
454them with tab characters.  The following shows what happens pressing <C-t>
455a few times.
456  A "." stands for a space character and "------->" for a tab character.
457
458	type				result ~
459	<C-t>				....
460	<C-t><C-t>			------->
461	<C-t><C-t><C-t>			------->....
462
463  Similarly pressing <C-d> in Insert mode would decrease the indent.  Hence
464with `set tabstop=8 shiftwidth=2` one has
465
466	type				result ~
467	<C-t><Tab><C-t>			..----->..
468	<C-t><Tab><C-t><C-d>		------->
469
470  A third option that one could set in `vi` was 'autoindent'.  It copies the
471indent level of the previous lines,
472
473	type				result ~
474	<Space><Tab>hello		.------>hello
475	<Space><Tab>hello<Enter>	.------>hello
476					------->
477
478but the new line is produced by optimizing the number of characters used.
479
480
481JUST SPACES
482
483But separating tab stops with 8 columns was not universal: IBM had a standard
484at 10 columns, and today some Go developers write code with `tabstop=4`.  Every
485time text is displayed with a different 'tabstop' value, it risks misaligning
486the text, especially once the file is shared and opened on another machine.
487  In the meantime, computers got much better and the few octets saved by using
488tabs were no longer making any real difference.  It became possible to use
489only spaces and thus guarantee the same resulting text everywhere.  But using
490only spaces was impossible in `vi` without sacrificing features.  Remember that
491'autoindent' would systematically try to input a tab character when it could.
492  Vim 4.0 made working with only spaces as convenient as working only with
493tabs (or a mix of tabs and spaces), by introducing the 'expandtab' option.
494When set, Vim will replace any horizontal tab character it would normally
495insert with an equivalent number of spaces, to end up with the same visual
496effect. <BS> would continue to remove only one character at a time.
497
498	type				result ~
499	<Tab>				........
500	<Tab><BS>			.......
501
502
503CHANGING TABS IN SPACES (AND BACK)
504
505Setting 'expandtab' does not immediately affect existing tab characters.  In
506order to purge a file from all its horizontal tab characters, Vim 5.3
507introduced the |:retab| command.  Use these commands: >
508
509	:set expandtab
510	:retab
511
512This is a little bit dangerous, because it can also change tabs inside a
513string.  To check if these exist, you could use this: >
514
515	/"[^"\t]*\t[^"]*"
516
517It's recommended not to use actual tab characters inside a string.  Replace
518them with "\t" to avoid trouble.
519
520  The other way around works just as well: >
521
522	:set noexpandtab
523	:retab!
524
525
526SOFT TAB STOPS
527
528When using only spaces, or a mix of spaces and horizontal tabs, one gets the
529unpleasant feeling that the two keys <Tab> and <BS> do not act in mirror, as
530they do when using only tab characters.
531  Vim 5.4 introduced the 'softtabstop' option.  On top of the (hard) tab stops
532used to display the horizontal tab characters in the text, Vim adds extra
533soft tab stops dedicated only to the cursor.  When 'softtabstop' is set to a
534positive value, the <Tab> key will push the cursor to the next soft tab stop.
535Vim will insert the correct combination of tab characters and spaces to
536achieve this effect.  Likewise pressing <BS> will have the cursor try to
537reach the nearest soft tab stop.  The following example uses
538`:set softtabstop=4`
539
540	type			result ~
541	<Tab>			....
542	<Tab><Tab>a		------->a
543	<Tab><Tab>a<Tab>	------->a...
544	<Tab><Tab>a<Tab><BS>	------->a
545
546  To maintain global coherence, one can `:set softtabstop=-1` so that
547the value of 'shiftwidth' is used for the number of columns between two soft
548tab stops.
549
550  If you prefer to have different values for 'shiftwidth' and 'softtabstop',
551you can still do so and use <C-t> to indent with 'shiftwidth'.  Or you can
552use the 'smarttab' option, allowing for a unified <Tab> key that knows what to
553do in the different situations.
554
555
556VARIABLE TAB STOPS
557
558As we said before, the ASCII table was designed to remotely control
559teleprinters.  A given teleprinter could be configured to have their physical
560tab stops have variable spacing.  After all, the ^I control character was
561only stipulating: go to the next tab stop wherever it is.
562  Vim 7.3 introduced 'vartabstop' to emulate the same functionality.  For
563example if Vim was compiled with `+vartabs` and `:set vartabstop=2,4` one gets
564
565	actual character	result ~
566	^I			->
567	^I^I			->--->
568	^I^I^I			->--->--->
569
570  Similarly, 'varsofttabstop' was also introduced, to have variably spaced
571soft tab stops.  With `:set varsofttabstop=2,4` one gets
572
573	type			  result ~
574	<Tab>			  ..
575	<Tab><Tab>		  ......
576	<Tab><Tab><Tab>		  ------->....
577
578
579EXAMPLES OF CONFIGURATION
580
581By default, Vim is configured to use only tabs: >
582
583	:set tabstop=8
584	:set shiftwidth=8
585	:set noexpandtab
586	:set softtabstop=0
587	:set nosmarttab
588<
589  If you want to write C code as if it were Python (only spaces, with indents
590of 4 spaces), here is what you can use: >
591
592	:set shiftwidth=4
593	:set softtabstop=-1
594	:set expandtab
595<
596  If you want the same behavior but with better control over alignment
597(e.g.  lining up parameters or comments in multiples of 2 spaces), use: >
598
599	:set shiftwidth=4
600	:set softtabstop=2
601	:set expandtab
602	:set smarttab
603<
604  If instead, you would like to write C code like Bram Moolenaar would have
605(using a mix of tabs and spaces), you can use >
606
607	:set shiftwidth=4
608	:set softtabstop=-1
609<
610
611==============================================================================
612*30.6*	Formatting comments
613
614One of the great things about Vim is that it understands comments.  You can
615ask Vim to format a comment and it will do the right thing.
616   Suppose, for example, that you have the following comment: >c
617
618	/*
619	 * This is a test
620	 * of the text formatting.
621	 */
622
623You then ask Vim to format it by positioning the cursor at the start of the
624comment and type: >
625
626	gq]/
627
628"gq" is the operator to format text.  "]/" is the motion that takes you to the
629end of a comment.  The result is: >c
630
631	/*
632	 * This is a test of the text formatting.
633	 */
634
635Notice that Vim properly handled the beginning of each line.
636  An alternative is to select the text that is to be formatted in Visual mode
637and type "gq".
638
639To add a new line to the comment, position the cursor on the middle line and
640press "o".  The result looks like this: >c
641
642	/*
643	 * This is a test of the text formatting.
644	 *
645	 */
646
647Vim has automatically inserted a star and a space for you.  Now you can type
648the comment text.  When it gets longer than 'textwidth', Vim will break the
649line.  Again, the star is inserted automatically: >c
650
651	/*
652	 * This is a test of the text formatting.
653	 * Typing a lot of text here will make Vim
654	 * break
655	 */
656
657For this to work some flags must be present in 'formatoptions':
658
659	r	insert the star when typing <Enter> in Insert mode
660	o	insert the star when using "o" or "O" in Normal mode
661	c	break comment text according to 'textwidth'
662
663See |fo-table| for more flags.
664
665
666DEFINING A COMMENT
667
668The 'comments' option defines what a comment looks like.  Vim distinguishes
669between a single-line comment and a comment that has a different start, end
670and middle part.
671   Many single-line comments start with a specific character.  In C++ // is
672used, in Makefiles #, in Vim scripts ".  For example, to make Vim understand
673C++ comments: >
674
675	:set comments=://
676
677The colon separates the flags of an item from the text by which the comment is
678recognized.  The general form of an item in 'comments' is:
679
680	{flags}:{text}
681
682The {flags} part can be empty, as in this case.
683   Several of these items can be concatenated, separated by commas.  This
684allows recognizing different types of comments at the same time.  For example,
685let's edit an e-mail message.  When replying, the text that others wrote is
686preceded with ">" and "!" characters.  This command would work: >
687
688	:set comments=n:>,n:!
689
690There are two items, one for comments starting with ">" and one for comments
691that start with "!".  Both use the flag "n".  This means that these comments
692nest.  Thus a line starting with ">" may have another comment after the ">".
693This allows formatting a message like this:
694
695	> ! Did you see that site? ~
696	> ! It looks really great. ~
697	> I don't like it.  The ~
698	> colors are terrible. ~
699	What is the URL of that ~
700	site? ~
701
702Try setting 'textwidth' to a different value, e.g., 80, and format the text by
703Visually selecting it and typing "gq".  The result is:
704
705	> ! Did you see that site?  It looks really great. ~
706	> I don't like it.  The colors are terrible. ~
707	What is the URL of that site? ~
708
709You will notice that Vim did not move text from one type of comment to
710another.  The "I" in the second line would have fit at the end of the first
711line, but since that line starts with "> !" and the second line with ">", Vim
712knows that this is a different kind of comment.
713
714
715A THREE PART COMMENT
716
717A C comment starts with "/*", has "*" in the middle and "*/" at the end.  The
718entry in 'comments' for this looks like this: >
719
720	:set comments=s1:/*,mb:*,ex:*/
721
722The start is defined with "s1:/*".  The "s" indicates the start of a
723three-piece comment.  The colon separates the flags from the text by which the
724comment is recognized: "/*".  There is one flag: "1".  This tells Vim that the
725middle part has an offset of one space.
726   The middle part "mb:*" starts with "m", which indicates it is a middle
727part.  The "b" flag means that a blank must follow the text.  Otherwise Vim
728would consider text like "*pointer" also to be the middle of a comment.
729   The end part "ex:*/" has the "e" for identification.  The "x" flag has a
730special meaning.  It means that after Vim automatically inserted a star,
731typing / will remove the extra space.
732
733For more details see |format-comments|.
734
735==============================================================================
736
737Next chapter: |usr_31.txt|  Exploiting the GUI
738
739Copyright: see |manual-copyright|
740
741vim:tw=78:ts=8:noet:ft=help:norl: