Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect git managed tags #773

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

h-east
Copy link

@h-east h-east commented Jun 28, 2018

Hi Junegunn,

Vim's documentation recommends that package include doc/tags.

:help package-create

Run the :helptags command to generate the doc/tags file.  Including this
generated file in the package means that the user can drop the package in his
pack directory and the help command works right away.  Don't forget to re-run
the command after changing the plugin help:
        :helptags path/start/foobar/doc
        :helptags path/opt/fooextra/doc

:help help-writing

- Make a package with all the files and the tags file available for download.
  Users can drop it in one of the "doc" directories and start use it.
  Report this to Bram, so that he can add a link on www.vim.org.

In fact, many packages does not contain doc/tags in the repository.
So I think that vim-plug is unconditionally running :helptags after installation and update.
I think that should not run :helptags in the case of installation or update of that package.
Please respect tags that git managed.

This PR is changed to execute :helptags only when either of the following conditions is satisfied.

  • tags file is not exist.
  • tags file is not managed by git.

Please check it out.

Note:
Repository of package containing doc/tags (or doc/tags-??x)

--
Best regards,
Hirohito Higashi (h_east)

plug.vim Outdated
@@ -600,13 +600,24 @@ function! s:update(force, names)
call s:update_impl(1, a:force, a:names)
endfunction

function! s:is_exec_helptags(docdir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function name is un-clear to be what should do.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about s:is_need_exec_helptags ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm not native speaker, I cannot answer best. But has_helptags(x) or helptags_exists(x) ?
cc @junegunn

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think do_need_exec_helptags() is best.
I'll change it after I came back today or tomorrow. 😙

Thank you mattn 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants