ctags和Fortran的接口 [英] ctags and Fortran's interfaces

查看:175
本文介绍了ctags和Fortran的接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I'm wondering how to get ctags working with interfaces in Fortran, eg:

我想知道如何使用Fortran中的接口来使用ctags,例如: SOME_ROUTINE_A
MODULE SOME_ROUTINE_B
END SOME_ROUTINE

INTERFACE SOME_ROUTINE MODULE SOME_ROUTINE_A MODULE SOME_ROUTINE_B END SOME_ROUTINE

为了调用SOME_ROUTINE_A或SOME_ROUTINE_B取决于传递给子程序的参数。

So that either SOME_ROUTINE_A or SOME_ROUTINE_B is called depending on the parameters passed to the subroutine.

如果我将光标移至Vim中的SOME_ROUTINE的一个调用上,然后点击C-],我会得到一个标记没有找到:SOME_ROUTINE错误,如果我检查我的ctags文件,它们不在那里。

If I've got my cursor over a call to SOME_ROUTINE in Vim, and hit C-], I get a "tag not found: SOME_ROUTINE" error, and if I check my ctags file they're not in there.

奇怪的是我也在使用Vim taglist插件,并且源文件中的界面将显示在标签列表窗口中。我可以找到这个工作的唯一线索是taglist插件代码中的这一行:

The weird thing is that I'm also using the Vim taglist plugin, and the interfaces in a source file will show up in the taglist window. The only clue I could find to how this is working is this line in the taglist plugin code:

let s:tlist_def_fortran_settings = 'fortran;p:program;b:block data;' .
                \ 'c:common;e:entry;i:interface;k:type;l:label;m:module;' .
                \ 'n:namelist;t:derived;v:variable;f:function;s:subroutine'

我检查了ctags的手册,找不到任何线索知道这是如何工作的,任何人都知道发生了什么?

I've checked the manual for ctags and can't find any clue to how this is working, anyone know what's going on?

推荐答案

好的,当然我会在问这个问题后找到答案。我只需要将--fortran-kinds = + i添加到我的ctags命令中。

Ok so of course I find the answer right after asking this question. I just needed to add "--fortran-kinds=+i" to my ctags command.

运行ctags --list-kinds可以输出为不同的语言。

Running "ctags --list-kinds" lists the kinds of information that can be output for different languages.

这篇关于ctags和Fortran的接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆