简体   繁体   English

如何获取ctags来为yeoman生成的AngularJS webapp完全生成标签?

[英]How can I get ctags to generate tags for a yeoman generated AngularJS webapp completely?

I have an AngularJS project that was scaffolded using yeoman. 我有一个使用yeoman搭建的AngularJS项目。 I want to use ctags to generate tags for the whole project so that I can navigate the code in vim. 我想使用ctags为整个项目生成标签,以便可以在vim中导航代码。 But when I use the command 但是当我使用命令

ctags -R .

in the root folder, it generates tags for folders at one or two levels deeper relative to root. 在根文件夹中,它为相对于根更深一两个级别的文件夹生成标签。 The folders at 5-6 levels deeper are not tagged by ctags. 较深5-6级的文件夹不会被ctags标记。 How can I get it to work for the whole project? 我如何才能使它在整个项目中正常工作? I am using exuberant-ctags for generating tags. 我正在使用旺盛的ctags生成标签。 OS : Ubuntu 15.04 操作系统:Ubuntu 15.04

Do you get the same results with the following? 通过以下操作,您得到相同的结果吗?

ctags -R *

What OS? 什么操作系统? Have you verified it's NOT a permissions issue? 您是否已确认这不是权限问题?

ctags uses the file extension to correctly choose the parser that it will use to generate the tags file. ctags使用文件扩展名正确选择它将用于生成标签文件的解析器。 It's possible that the files you are not finding have an unsupported extension. 找不到的文件可能具有不支持的扩展名。

Another possibility is that those files are using language extensions not supported by Exuberant Ctags. 另一种可能性是这些文件正在使用Exuberant Ctags不支持的语言扩展名。 In which case you might want to try Universal Ctags , which was forked from Exuberant and is in active development. 在这种情况下,您可能要尝试Universal Ctags ,它是由Exuberant派生的,并且正在积极开发中。 It is possible that the JS parser was improved in this fork of ctags. 可能在此ctags分支中改进了JS解析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM