-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes are based on this StackOverflow question: http://stackoverflow.com/questions/32206608/ctags-and-r-regex * Add two new types: global variables and function variables. * Require a '(' after the function in order to guarantee distinction between variable and function declarations. * Add description to all tag types. * Add test cases.
- Loading branch information
Showing
5 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.First input.r /^.First <- function() {$/;" f | ||
MASS input.r /^ library(MASS) # attach a package$/;" s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# From: | ||
# https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Customizing-the-environment | ||
.First <- function() { | ||
options(prompt="$ ", continue="+\t") # $ is the prompt | ||
options(digits=5, length=999) # custom numbers and printout | ||
x11() # for graphics | ||
par(pch = "+") # plotting character | ||
source(file.path(Sys.getenv("HOME"), "R", "mystuff.R")) | ||
# my personal functions | ||
library(MASS) # attach a package | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo input.r /^foo <- function () {$/;" f | ||
x input.r /^x <- 1$/;" g | ||
y input.r /^ y <- 2$/;" v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copuied from: | ||
# http://stackoverflow.com/questions/32206608/ctags-and-r-regex | ||
x <- 1 | ||
foo <- function () { | ||
y <- 2 | ||
return(y) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters