doujiao6872888
2014-04-29 11:52
浏览 41
已采纳

helptags不会使用vim-php-manual生成正确的标签

I download vim-php-manual in this page and unzip in ~/.vim/vim-php-manual(the tgz file has a tags file). I can use K on some function name and see the parameter of this function. Everything is good.

But I execute :Helptags in Vim normal mode, it generate some wired tags in ~/.vim/vim-php-manual.

/   apache-request-headers.txt  /*\/*
NOT strtr.txt   /*NOT*
estimated   ifx-getsqlca.txt    /*estimated*

I think Vim must generate wrong tags with wrong symbol. I open the file ~/.vim/vim-php-manual/ifx-getsqlca.txt and :set ft=text. I see estimated being surround star sign(*), like *estimated*, so Vim treat it as the tags name.

Is that mean I can't execute :Helptags forever? Because it always generates wrong tags for vim-php-manual

It seems contradiction because vim will find the help file in runtimepath and :Helptags will generate tags with runtimepath?

图片转代码服务由CSDN问答提供 功能建议

我下载 vim-php-manual 在此页面 并在〜/ .vim / vim-php-manual 中解压缩( tgz文件有一个标记文件)。 我可以在某个函数名上使用 K 并查看该函数的参数。 一切都很好。

但我在Vim正常模式下执行:Helptags ,它会在〜/ .vim / vim-php-中生成一些有线标签 手动

  / apache-request-headers.txt / * \ / * 
NOT strtr.txt / * NOT * 
estimated ifx-getsqlca.txt /  *估计* 
   
 
 

我认为Vim必须使用错误的符号生成错误的标签。 我打开文件〜/ .vim / vim-php-manual / ifx-getsqlca.txt :set ft = text 。 我看到估计是环绕星座(*),如 * estimated * ,所以Vim将其视为标签名称。

这是否意味着我无法永远执行:Helptags ? 因为它总是为 vim-php-manual 生成错误的标签

这似乎很矛盾,因为vim会在 runtimepath 中找到帮助文件, :Helptags 将使用 runtimepath 生成标签?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drcx71276 2014-04-30 19:52
    已采纳

    It is odd that one of the files I get when I expand vim-php-manual.tgz is vim-php-manual.tgz.

    When I expand the archive, I get a bunch of *.txt files, a tags file, and the odd file I just mentioned. No subdirectories, nothing else. So all you have to do is create a directory, expand the archive into it, and adjust the 'tags' option in vim. (Use a FileType autocommand or put it in .../after/ftplugin/php.vim if you want the setting only when you are editing PHP.)

    I think the idea is to use the tags file that comes bundled with the archive, not to generate it from the help files using vim. If you need to regenerate the tags file, then follow the instructions on the page where you found the archive.

    The :Helptags function (part of the pathogen plugin) only parses files with the extension .txt that are in a directory doc/ somewhere under 'runtimepath'. If you do not want to overwrite the tags file when you run :Helptags, then call the directory where you put these files something other than doc/, for example doc-php/ or vim-php-manual/.

    I just did that, putting the files in ~/.vim/vim-php-manual/, and ran :Helptags and it did not have any effect.

    点赞 评论

相关推荐 更多相似问题