2017-05-31 78 views

回答

1

您可能會喜歡Universal-ctags的xformat功能。使用該功能,您可以定義自己的輸出格式。

[[email protected]]~/var/ctags% cat input.c 

#define ZERO 0 
int main(void) 
{ 
    return ZERO; 
} 
[[email protected]]~/var/ctags% ./ctags -x --_xformat='(N, K, L) = ("%{name}", "%{kind}", %{line})' input.c 

(N, K, L) = ("ZERO", "macro", 1) 
(N, K, L) = ("main", "function", 2) 

http://docs.ctags.io/en/latest/news.html#customizing-xref-output可能會給你更多的提示。