[patch] fixed incorrect modeline example in :help modeline-version

16 views
Skip to first unread message

Dominique Pellé

unread,
Dec 17, 2019, 6:38:54 AM12/17/19
to vim_dev
Hi

In :help modeline-version there is an incorrect modeline example:

=== BEGIN QUOTE ===
If you want to include a ':' in a set command precede it with a '\'. The
backslash in front of the ':' will be removed. Example:
/* vi:set dir=c\:\tmp: */ ~
This sets the 'dir' option to "c:\tmp". Only a single backslash before the
':' is removed. Thus to include "\:" you have to specify "\\:".
=== END QUOTE ===

That modeline does not work. It gives:

Error detected while processing modelines:
line 1:
E520: Not allowed in a modeline: dir=c:\tmp

It is forbidden to set option 'dir' in the modeline.
So attached patch changes the example to:

/* vi:set fillchars=stl\:^,vert\:\|: */

Regards
Dominique
incorrect-modeline-example-in-doc.patch

Bram Moolenaar

unread,
Dec 17, 2019, 4:41:26 PM12/17/19
to vim...@googlegroups.com, Dominique Pellé
Thanks!

--
GALAHAD hurries to the door and pushes through it. As he leaves the room
we CUT TO the reverse to show that he is now in a room full of bathing
and romping GIRLIES, all innocent, wide-eyed and beautiful. They smile
enchantingly at him as he tries to keep walking without being diverted by
the lovely sights assaulting his eyeballs.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages