从鸡蛋中提取ctag用于发育。

z3c.recipe.tag的Python项目详细描述


z3c.recipe.tag

buildstatus

简介

此配方生成一个标记数据库文件,可与 快速查找类和函数的不同编辑器的数目 包的源文件和egg依赖项中的定义。

依赖关系

在运行启用标记的构建之前,必须安装 适当的命令行标记生成工具:强大的ctag和 ID使用。在ubuntu中,您可以使用apt-get:

$ sudo apt-get install exuberant-ctags id-utils

在Mac上,从http://www.macports.org/" rel="nofollow">http://www.macports.org/下载并安装 端口 ,然后 以这种方式安装ctag和idutils:

$ sudo port install ctags idutils

如何使用此配方

带构建

假设您有一个名为 myapplication 的egg。使用这个配方 buildout,您可以在 buildout.cfg 文件中添加以下内容:

[tags]
recipe = z3c.recipe.tag
eggs = MyApplication

这将在 bin/ 目录中生成一个脚本文件,您可以 然后这样跑:

$ ./bin/tags

默认情况下,此脚本在目录中从 你运行的脚本:

  • 一个名为 标记的ctags文件,供emacs使用,
  • 一个名为 tags 的ctags文件,供vi使用,并且
  • 一个名为 id 的id utils文件,供id utils(gid,lid)使用。

然后,您可以在您选择的编辑器中使用这些文件。

也可以选择要生成的文件。以下是输出 关于 /bin/tags --帮助

usage: build_tags [options]

options:
  -h, --help            show this help message and exit
  -l LANGUAGES, --languages=LANGUAGES
                        ctags comma-separated list of languages. defaults to
                        ``-JavaScript``
  -e, --ctags-emacs     flag to build emacs ctags ``TAGS`` file
  -v, --ctags-vi        flag to build vi ctags ``tags`` file
  -b, --ctags-bbedit    flag to build bbedit ctags ``tags`` file
  -i, --idutils         flag to build idutils ``ID`` file

如果您希望在默认情况下设置命令行选项(例如限制 在默认情况下构建到ctags vi)您可以将 default 选项传入 你的buildout.cfg:

[tags]
recipe = z3c.recipe.tag
eggs = MyApplication
default = ['-v']
使用virtualenv时

您可以将其与 virtualenv 也:

my_venv/bin/pip install z3c.recipe.tag
my_venv/bin/build_tags

这将为该virtualenv中安装的所有软件包生成一个标记文件。

使用摊铺机

如果您使用的是 摊铺机 ,并且已经 已安装z3c.recipe.tag,则只需将此行添加到 你的 人行道.py 文件:

import z3c.recipe.tag

然后从命令行运行 z3c.recipe.tag.tags任务:

$ paver z3c.recipe.tag.tags

其他资源

有关在不同编辑器中使用标记表的其他信息 请访问以下网站:

  • emacs :http://www.gnu.org/software/emacs/manual/html嫒node/emacs/tags.html" rel="nofollow">http://www.gnu.org/software/emacs/manual/html嫒node/emacs/tags.html
    • 要跳转到标记的位置,请键入 m-x 查找标记 标记的名称。或者使用m-. 跳转到与令牌匹配的标记 光标当前处于打开状态。你第一次这样做,你会 提示输入标记文件的位置。
  • vim :http://vimdoc.sourceforge.net/htmldoc/tagsrch.html" rel="nofollow">http://vimdoc.sourceforge.net/htmldoc/tagsrch.html
  • bbedit :http://pine.barebones.com/manual/bbedit_9_user_manual.pdf" rel="nofollow">http://pine.barebones.com/manual/bbedit_9_user_manual.pdf 第14章,第324页

有关CTAG的更多信息,请访问http://ctags.sourceforge.net/" rel="nofollow">http://ctags.sourceforge.net/

bbedit 是一个Macintosh文本编辑器。)

有关gnu id utils的更多信息(基本上是本地文本 索引/搜索引擎;把它看作是grep的一个非常快速的版本 -w ,请参见 id utils手册

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java这算是人工智能吗?   java@OnDelete(级联)不处理双向映射(hibernate)   java我怎样才能在基元类型(int)上修复这个等式   java如何初始化PrintWriter数组?   arraylist如何使用java添加敌人   java如何处理2019年的背景地理围栏?   java是否有一个XPath表达式可用于在CDATA区域中导航XML?   Kotlin(Android Studio)中的java选项卡式活动   安卓 java。lang.IllegalArgumentException:provider=网络   广播控制流和主流的java排序   java Apache Nifi无法启动Nifi实例   java我正在尝试将内容作为字符串放入ListView   java阻止mozilla会话还原   java在春季选择引用哪个bean?