普通网友 2014-04-29 11:52
浏览 51
已采纳

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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本