Skip to content

Instantly share code, notes, and snippets.

@felixr
felixr / rtags.awk
Created July 31, 2012 19:34
Generate ctags for R scripts
function addtag(name, lnum, line, kind)
{
# Change all occurences of "/" to "\/" and "\" to "\\"
gsub(/\\/,"\\\\",line)
gsub(/\//,"\\/",line)
tag[name] = FILENAME "\t/^" line "$/;\"\t" kind "\tline:" lnum
}