加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – 我的.ctags文件有什么问题?

发布时间:2020-12-13 17:11:42 所属栏目:PHP教程 来源:网络整理
导读:我是一个ctags新手,用 PHP编码.我在网上找到了这个ctags文件: -R--exclude=.svn--tag-relative=yes--PHP-kinds=+cfpd--regex-PHP=/abstracts+classs+([^ ]+)/1/c/--regex-PHP=/interfaces+([^ ]+)/1/c/--regex-PHP=/(publics+|statics+|protecteds+
我是一个ctags新手,用 PHP编码.我在网上找到了这个ctags文件:

-R
--exclude=.svn
--tag-relative=yes
--PHP-kinds=+cfpd
--regex-PHP=/abstracts+classs+([^ ]+)/1/c/
--regex-PHP=/interfaces+([^ ]+)/1/c/
--regex-PHP=/(publics+|statics+|protecteds+|privates+)$([^     =]+)/2/p/
--regex-PHP=/consts+([^    =]+)/1/d/
--regex-PHP=/finals+(publics+|statics+|abstracts+|protecteds+|privates+)functions+&;?s*([^ (]+)/2/f/

但是,我收到此错误:

$ctags
ctags: Warning: Unsupported parameter 'p' for --PHP-kinds option

从实验中我看到p需要定义,实际上它是在文件的第七行定义的.那么为什么会抛出错误呢?

编辑:
ctags文件来自from here,它是从this terrific article链接的.

这是我配置的输出:

$ctags --version
ctags: Warning: Unsupported parameter 'p' for --PHP-kinds option
Exuberant Ctags 5.6,Copyright (C) 1996-2004 Darren Hiebert
Compiled: Jan  6 2007,02:10:54
Addresses: <dhiebert@users.sourceforge.net>,http://ctags.sourceforge.net
Optional compiled features: +wildcards,+regex
$cat ~/.ctags
-R
--exclude=.svn
--tag-relative=yes
--regex-PHP=/abstracts+classs+([^ ]+)/1/c/
--regex-PHP=/interfaces+([^ ]+)/1/c/
--regex-PHP=/(publics+|statics+|protecteds+|privates+)$([^ t=]+)/2/p/
--regex-PHP=/consts+([^ t=]+)/1/d/
--regex-PHP=/finals+(publics+|statics+|abstracts+|protecteds+|privates+)functions+&;?s*([^ (]+)/2/f/
--PHP-kinds=+cpdf
$ctags
ctags: Warning: Unsupported parameter 'p' for --PHP-kinds option
$

解决方法

默认情况下,没有为PHP定义’p’类型.

--regex-PHP=/(publics+|statics+|protecteds+|privates+)$([^     =]+)/2/p/

在你的情况下为PHP定义’p’类型.如果你搬家

--PHP-kinds=+cfpd

在此之后,它不会给你一个错误.

注意:这是我的ctags版本信息:

$ctags --version 
Exuberant Ctags 5.8,Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Apr 19 2012,11:31:19
  Addresses: <dhiebert@users.sourceforge.net>,http://ctags.sourceforge.net
  Optional compiled features: +wildcards,+regex

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读