【发布时间】:2015-08-25 14:21:58
【问题描述】:
我正在尝试将 ctags 与 R 一起使用。使用 this 我添加的答案
--langdef=R
--langmap=r:.R.r
--regex-R=/^[ \t]*"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t]function/\1/f,Functions/
--regex-R=/^"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/g,GlobalVars/
--regex-R=/[ \t]"?([.A-Za-z][.A-Za-z0-9_]*)"?[ \t]*<-[ \t][^f][^u][^n][^c][^t][^i][^o][^n]/\1/v,FunctionVariables
到我的.ctags 文件。但是,当尝试使用以下 R 文件生成标签时
x <- 1
foo <- function () {
y <- 2
return(y)
}
仅识别函数foo。我还想为变量生成标签(即上面的代码中的x 和y)。我应该更改 ctags 文件中的正则表达式吗?提前致谢。
【问题讨论】:
-
您是否安装了插件并修改了您的 .vimrc?
-
@rawr 我在 Vim 上使用 this 标签栏设置。