On Wed, Aug 16, 2006 at 02:18:55AM +0200, A.J.Mechelynck wrote:
> Gabriel Farrell wrote:
> >Hi,
> >
> >Regarding a thread [1] back in February on this list about local
> >additions, I'm not seeing some of the errors remarked upon at that
> >time, but I do see 'matchit.txt' under the LOCAL ADDITIONS heading
> >even when it's not installed. If I do copy it into the doc directory
> >and run helptags, it's listed twice. A minor annoyance, to be sure.
> >
> >gabe
> >
> >[1] http://marc.theaimsgroup.com/?t=113952672100003
>
> What you see there may depend on how you update your Vim runtime files,
> and when you last did. I do it by downloading the contents of
> ftp://ftp.vim.org/pub/vim/runtime/ except its dos/ subdirectory, my
> help.txt is dated:
>
> *help.txt* For Vim version 7.0. Last change: 2006 Jun 16
>
> I have matchit.txt (and two more files) in $VIM/vimfiles/doc, and I see
>
> LOCAL ADDITIONS: *local-additions*
> |matchit.txt| Extended "%" matching
> |pi_netrw.txt| For Vim version 7.0. Last change: 2006 Jun 08
> |pi_vimball.txt| For Vim version 7.0. Last change: 2006 Jun 19
>
> ------------------------------------------------------------------------------
>
>
> Running "less" on the same file shows that the LOCAL ADDITIONS section
> is actually empty in the file as it resides on disk. You might want to
> open it with a text editor other than Vim, and remove all non-blank
> lines between LOCAL ADDITIONS and the horizontal line.
>
>
> Best regards,
> Tony.
If there are any non-blank lines there, I would consider the file
corrupted.
The documentation on this feature is a little terse. Using
:helpgrep local-add
leads to
:help write-local-help
which explains where those lines come from. The surprising thing (for
me) is that these lines are added whether or not :helptags has been run
on the directory containing the doc files. I did not figure this out
until I looked at the source:
vim70/src $ grep local-add *.c
vim70/src $ vim ex_cmds.c
/local-add
According to the comments there, vim builds the "LOCAL ADDITIONS"
section by looking for doc/*.txt in every 'runtimepath' directory other
than $VIMRUNTIME and extracting the first line.
Conclusion: if you have a line for matchit.txt under LOCAL
ADDITIONS, then you probably have doc/matchit.txt somewhere in your
runtime path; if you have duplicate entries, then you have duplicate
files. It does not matter whether you have installed the help files
with :helptags . Does this explain what you see?
HTH --Benji Fisher