1- *syntax.txt* For Vim version 9.1. Last change: 2026 Jan 06
1+ *syntax.txt* For Vim version 9.1. Last change: 2026 Jan 23
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2702,50 +2702,50 @@ If you don't want to highlight these errors, leave it unset.
27022702
27032703NROFF *nroff.vim* *ft-nroff-syntax*
27042704
2705- The nroff syntax file works with AT&T n/troff out of the box. You need to
2706- activate the GNU groff extra features included in the syntax file before you
2707- can use them.
2708-
2709- For example, Linux and BSD distributions use groff as their default text
2710- processing package. In order to activate the extra syntax highlighting
2711- features for groff, arrange for files to be recognized as groff (see
2705+ The nroff syntax file works with AT&T n/troff as-is. To support GNU troff
2706+ (groff), which Linux and BSD distributions use as their default typesetting
2707+ package, arrange for files to be recognized as groff input (see
27122708| ft-groff-syntax | ) or add the following option to your start-up files: >
27132709
27142710 :let nroff_is_groff = 1
27152711
2716- Groff is different from the old AT&T n/troff that you may still find in
2717- Solaris. Groff macro and request names can be longer than 2 characters and
2718- there are extensions to the language primitives. For example, in AT&T troff
2719- you access the year as a 2-digit number with the request \(yr. In groff you
2720- can use the same request, recognized for compatibility, or you can use groff's
2721- native syntax, \[yr]. Furthermore, you can use a 4-digit year directly:
2722- \[year]. Macro requests can be longer than 2 characters, for example, GNU mm
2723- accepts the requests ".VERBON" and ".VERBOFF" for creating verbatim
2724- environments.
2712+ GNU troff differs from older AT&T n/troff programs (that you may still find in
2713+ Solaris or Plan 9) by extending the *roff language syntax. For example, in
2714+ AT&T troff, you access the count of years since 1900 with the escape sequence
2715+ \(yr. In groff you can do the same, which it recognizes for compatibility, or
2716+ use groff's extended syntax, \[yr]. AT&T troff documented the yr register as
2717+ storing the "last two digits of current year", but had a Y2K problem; in
2718+ groff, you can access the Gregorian year correctly: \[year]. In groff, font,
2719+ register, macro, string, and request names can exceed two characters; for
2720+ example, with groff's mm package, the control lines ".VERBON" and ".VERBOFF"
2721+ call macros of those names to bracket displays of "verbatim" content.
27252722
27262723In order to obtain the best formatted output g/troff can give you, you should
27272724follow a few simple rules about spacing and punctuation.
27282725
2729- 1. Do not leave empty spaces at the end of lines.
2726+ 1. Break the line (put a carriage return) at the end of every sentence. Don't
2727+ permit trailing spaces before the newline.
27302728
2731- 2. Leave one space and one space only after an end-of-sentence period,
2732- exclamation mark, etc .
2729+ 2. If a line ends with a period, question mark, or exclamation point that does
2730+ not end a sentence, follow it with the dummy character escape sequence \& .
27332731
2734- 3. For reasons stated below, it is best to follow all period marks with a
2735- carriage return .
2732+ 3. If you're using a macro package, employ its paragraphing macros to achieve
2733+ indentation of paragraphs and spacing between them .
27362734
2737- The reason behind these unusual tips is that g/n/troff have a line breaking
2738- algorithm that can be easily upset if you don't follow the rules given above .
2735+ 4. Use the empty request, a '.' on a line by itself, freely to visually
2736+ separate material for ease of document maintenance .
27392737
2740- Unlike TeX, troff fills text line-by-line, not paragraph-by-paragraph and,
2741- furthermore, it does not have a concept of glue or stretch, all horizontal and
2742- vertical space input will be output as is.
2738+ The reason for these tips is that g/n/troff attempts to detect the ends of
2739+ sentences, and can use that information to apply inter-sentence space. Using
2740+ them also minimizes the size of diffs where lines change due only to refilling
2741+ in the text editor. Macro packages typically employ inter-paragraph spacing
2742+ amounts other than one vee (which is the result of a blank input line), and
2743+ typically store that spacing amount, and that of paragraph indentation, in
2744+ user-configurable registers so that pages lay out consistently.
27432745
2744- Therefore, you should be careful about not using more space between sentences
2745- than you intend to have in your final document. For this reason, the common
2746- practice is to insert a carriage return immediately after all punctuation
2747- marks. If you want to have "even" text in your final processed output, you
2748- need to maintain regular spacing in the input text. To mark both trailing
2746+ Unlike TeX, troff fills text line-by-line, not paragraph-by-paragraph. If you
2747+ desire consistent spacing between words and sentences in formatted output, you
2748+ must maintain consistent spacing in the input text. To mark both trailing
27492749spaces and two or more spaces after a punctuation as an error, use: >
27502750
27512751 :let nroff_space_errors = 1
@@ -2765,11 +2765,11 @@ file: >
27652765
27662766 let b:preprocs_as_sections = 1
27672767
2768- As well , the syntax file adds an extra paragraph marker for the extended
2769- paragraph macro (.XP) in the ms package.
2768+ Further , the syntax file adds an extra paragraph marker for the XP
2769+ paragraphing macro in the ms package, a Berkeley and GNU extension .
27702770
2771- Finally, there is a | groff.vim | syntax file that can be used for enabling
2772- groff syntax highlighting either on a file basis or globally by default.
2771+ Finally, there is a | groff.vim | syntax file that can be used to enable groff
2772+ syntax highlighting either on a per- file basis or globally by default.
27732773
27742774
27752775OCAML *ocaml.vim* *ft-ocaml-syntax*
@@ -4699,7 +4699,7 @@ the region, but not the contents of the region, are marked as concealable.
46994699Whether or not they are actually concealed depends on the setting on the
47004700'conceallevel' option. The ends of a region can only be concealed separately
47014701in this way when they have their own highlighting via "matchgroup". The
4702- | synconcealed() | function can be used to retrieve information about conealed
4702+ | synconcealed() | function can be used to retrieve information about concealed
47034703items.
47044704
47054705cchar *:syn-cchar*
0 commit comments