Proposed improvement to :help 'directory'

11 views
Skip to first unread message

Gary Johnson

unread,
Aug 15, 2020, 4:33:16 PM8/15/20
to vim...@googlegroups.com
The help entry for 'directory' doesn't say anything about the colon
following the drive letter in the swap file name being replaced by
a percent sign.

I propose that the sentence describing the swap file name
construction be changed from

- For Unix and Win32, if a directory ends in two path separators "//",
the swap file name will be built from the complete path to the file
with all path separators substituted to percent '%' signs.

to

- For Unix and Win32, if a directory ends in two path separators "//",
the swap file name will be built from the complete path to the file
with the colon following the drive letter on Win32 and all path
separators replaced by percent '%' signs.

I also improved the grammar. A patch based on 8.2.1462 is attached.

Regards,
Gary
options.txt.diff

Bram Moolenaar

unread,
Aug 15, 2020, 4:59:11 PM8/15/20
to vim...@googlegroups.com, Gary Johnson
Thanks. Starting the sentence mentioning the colon for Win32 makes it a
bit long. Since the colon is a specific instance of the path separator,
I think it reads a bit easier like this:

- For Unix and Win32, if a directory ends in two path separators "//",
the swap file name will be built from the complete path to the file
with all path separators replaced by percent '%' signs (including
the colon following the drive letter on Win32). This will ensure
file name uniqueness in the preserve directory.


--
hundred-and-one symptoms of being an internet addict:
216. Your pet rock leaves home.

/// 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 ///

Gary Johnson

unread,
Aug 15, 2020, 5:11:27 PM8/15/20
to vim...@googlegroups.com
On 2020-08-15, Bram Moolenaar wrote:
> Gary Johnson wrote:
>
> > The help entry for 'directory' doesn't say anything about the colon
> > following the drive letter in the swap file name being replaced by
> > a percent sign.
> >
> > I propose that the sentence describing the swap file name
> > construction be changed from
> >
> > - For Unix and Win32, if a directory ends in two path separators "//",
> > the swap file name will be built from the complete path to the file
> > with all path separators substituted to percent '%' signs.
> >
> > to
> >
> > - For Unix and Win32, if a directory ends in two path separators "//",
> > the swap file name will be built from the complete path to the file
> > with the colon following the drive letter on Win32 and all path
> > separators replaced by percent '%' signs.
> >
> > I also improved the grammar. A patch based on 8.2.1462 is attached.
>
> Thanks. Starting the sentence mentioning the colon for Win32 makes it a
> bit long. Since the colon is a specific instance of the path separator,
> I think it reads a bit easier like this:
>
> - For Unix and Win32, if a directory ends in two path separators "//",
> the swap file name will be built from the complete path to the file
> with all path separators replaced by percent '%' signs (including
> the colon following the drive letter on Win32). This will ensure
> file name uniqueness in the preserve directory.

That works.

Regards,
Gary

Reply all
Reply to author
Forward
0 new messages