English 中文(简体)
如何快速添加新语言支持?
原标题:How to quickly add new language support for etags

我有一个与“http://ctags.sourceforge.net/EXTENDING.html”中指定的语言定义相似的.ctags文件,其语言定义类似于“http://ctags.sourceforge.net/extending.html”中指定的语言定义,rel=“nofollow”>ctaks docs :

  --langdef=swine
  --langmap=swine:.swn
  --regex-swine=/^def[ 	]*([a-zA-Z0-9_]+)/1/d,definition/

能否对标签做同样的事情? 当建立一个新的 TAGS 文件时, 我注意到( 可能出于明显的原因) 我的 ~ /. tags 文件没有效果。 我甚至尝试了将 ~ / tags 复制到 ~ /. tags 。 同样, 我对创建. tags 文件的文件已经厌倦了 。

是否有人知道我在哪里可以找到类似的标签(如果有差异的话) Docs?

Edit:为了记录,我的.ctags完全按照我的要求做了,但我在为同样效果运行 etags 时必须明确定义“- regex=” 。

文献资料:http://www.gnu.org/software/emacs/manual/html_node/emacs/Etags-Regexps.html>http://www.gnu.org/software/emacs/manual/html_node/emacs/Etags-Regexps.html

最佳回答

您可能是源力量的 可能 正在运行 actags ("Expeciant Ctags"), 但有 Emacs 提供的 aetags ?

尝试引用 ctags -e 而不是 etags ?

Edit: 我假设您的.ctags config在运行 ctags 时确实生效? 您没有明确说明是否属于这种情况, 如果没有, 那么您可能不会实际使用您认为的标签 。

ctags -- version etags -- version 报告什么?

问题回答

暂无回答




相关问题
Uncommon regular expressions [closed]

Recently I discovered two amazing regular expression features: ?: and ?!. I was curious of other neat regex features. So maybe you would like to share some tricky regular expressions.

regex to trap img tag, both versions

I need to remove image tags from text, so both versions of the tag: <img src="" ... ></img> <img src="" ... />

C++, Boost regex, replace value function of matched value?

Specifically, I have an array of strings called val, and want to replace all instances of "%{n}%" in the input with val[n]. More generally, I want the replace value to be a function of the match ...

PowerShell -match operator and multiple groups

I have the following log entry that I am processing in PowerShell I m trying to extract all the activity names and durations using the -match operator but I am only getting one match group back. I m ...

Is it possible to negate a regular expression search?

I m building a lexical analysis engine in c#. For the most part it is done and works quite well. One of the features of my lexer is that it allows any user to input their own regular expressions. This ...

regex for four-digit numbers (or "default")

I need a regex for four-digit numbers separated by comma ("default" can also be a value). Examples: 6755 3452,8767,9865,8766,3454 7678,9876 1234,9867,6876,9865 default Note: "default" ...