普通网友 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.

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

报告相同问题?

悬赏问题

  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
  • ¥20 怎么在stm32门禁成品上增加查询记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
  • ¥50 NT4.0系统 STOP:0X0000007B
  • ¥15 想问一下stata17中这段代码哪里有问题呀