!=============================================================================
!
! Syntax Highlighting Patterns for R
! by Ernesto Jardim, ernesto@ipimar.pt
! version: 1.5
!
! Configuring NEdit to use a new pattern set: 
! 
! * Close your NEdit sessions 
! * Start an NEdit session using the import command line option with the pattern you downloaded: 
! 
!   # nedit -import R-5.3.pats
! 
! * Go into the recognition patterns dialog (Preferences>Default Settings>Syntax Highlighting>Recognition Patterns...) and verify that the patterns are imported 
! * Use Preferences>Save Defaults... to store the modifications. 
! 
! * This version has been verified with the following versions on NEdit
!  - 5.3
!
!=============================================================================

nedit.highlightPatterns: \n\
R:1:0{\n\
       note:"#!":"$"::Rnote::\n\
       comment:"#":"$"::RComment::\n\
       blocks:"<(for|in|if|else|while|repeat|break|next|switch)>":::RKeyword::D\n\
       oop:"<(function|UseMethod|NextMethod|class)>":::Roop::\n\
       base:"<(abbreviate|abline|abs|acos|acosh|add.scope|add1|addTaskCallback|aggregate|AIC|AIC.logLik|airmiles|airquality|alias|alist|all|all.equal|all.equal.POSIXct|all.names|all.vars|anova|anscombe|any|aov|aperm|append|apply|approx|approxfun|apropos|Arg|args|Arithmetic|array|arrows|as.array|as.call|as.character|as.character.octmode|as.character.POSIXt|as.complex|as.data.frame|as.data.frame.logLik|as.data.frame.matrix|as.data.frame.model.matrix|as.data.frame.numeric|as.data.frame.ordered|as.data.frame.POSIXct|as.data.frame.POSIXlt|as.data.frame.table|as.data.frame.ts|as.data.frame.vector|as.double|as.environment|as.expression|as.factor|as.formula|as.function|as.integer|as.list|as.logical|as.matrix|as.matrix.noquote|as.matrix.POSIXlt|as.name|as.null|as.numeric|as.ordered|as.pairlist|as.POSIXct|as.POSIXlt|as.qr|as.real|as.single|as.symbol|as.table|as.table.ftable|as.ts|as.vector|asin|asinh|assign|assocplot|atan|atan2|atanh|attach|attenu|attitude|attr|attr.all.equal|attributes|autoload|autoloader|ave|axis|axis.POSIXct|backsolve|barplot|basename|BATCH|Bessel|bessel|besselI|besselJ|besselK|besselY|Beta|beta|Binomial|binomial|bitmap|bmp|body|box|boxplot|boxplot.formula|boxplot.stats|bringToTop|browser|bug.report|build|builtins|bw.bcv|bw.nrd|bw.nrd0|bw.SJ|bw.ucv|bxp|by|bzfile|C|c|c.POSIXct|c.POSIXlt|call|capabilities|cars|case.names|casefold|cat|Cauchy|cbind|cbind.ts|ceiling|char.expand|character|charmatch|chartr|check|check.options|chickwts|Chisquare|chol|chol2inv|choose|chull|class|close|close.screen|close.socket|closeAllConnections|cm|cm.colors|co.intervals|co2|codes|coef|coefficients|col|col2rgb|colMeans|colnames|colors|colours|colSums|commandArgs|comment|compareVersion|Comparison|complete.cases|complex|conflicts|Conj|connection|connections|contour|contr.helmert|contr.poly|contr.sum|contr.treatment|contrasts|contrib.url|contributors|Control|convolve|cooks.distance|coplot|copyright|copyrights|cor|cos|cosh|count.fields|cov|cov.wt|covratio|CRAN.packages|crossprod|cummax|cummin|cumprod|cumsum|curve|cut|cut.POSIXt|cycle|D|data.class|data.entry|data.frame|data.matrix|dataentry|date|DateTimeClasses|dbeta|dbinom|dcauchy|dchisq|de|debug|debugger|delay|delete.response|deltat|density|deparse|deriv|deriv3|det|detach|dev.control|dev.copy|dev.copy2eps|dev.cur|dev.interactive|dev.list|dev.next|dev.off|dev.prev|dev.print|dev.set|dev2bitmap|deviance|device|Devices|dexp|df|df.residual|dfbetas|dffits|dgamma|dgeom|dget|dhyper|diag|diff|diff.ts|difftime|digamma|dim|dimnames|dir|dir.create|dirname|discoveries|DLL.version|dlnorm|dlogis|dnbinom|dnorm|do.call|dotchart|double|download.file|download.packages|dpois|dput|drop|drop.scope|drop.terms|drop1|dsignrank|dt|dummy.coef|dump|dump.frames|dunif|duplicated|dweibull|dwilcox|dyn.load|dyn.unload|edit|edit.data.frame|edit.default|edit.matrix|eff.aovlist|effects|eigen|emacs|end|environment|erase.screen|esoph|euro|eurodist|eval|evalq|example|exists|exp|expand.grid|expand.model.frame|expm1|Exponential|expression|Extract|extractAIC|factor|factor.scope|faithful|family|family.glm|family.lm|FDist|fft|fifo|file|file.access|file.append|file.choose|file.copy|file.create|file.exists|file.info|file.path|file.remove|file.rename|file.show|files|filled.contour|find|findInterval|fitted|fivenum|fix|floor|flush.console|Foreign|Formaldehyde|formals|format|format.char|format.data.frame|format.default|format.factor|format.info|format.octmode|format.POSIXct|format.POSIXlt|format.pval|formatC|formatDL|formula|formula.lm|formula.terms|forwardsolve|fourfoldplot|frame|freeny|frequency|ftable|ftable.formula|Gamma|gamma|gammaCody|GammaDist|gaussian|gc|gc.time|gcinfo|gctorture|Geometric|get|getAllConnections|getCConverterDescriptions|getCConverterStatus|getConnection|geterrmessage|getNativeSymbolInfo|getNumCConverters|getOption|getTaskCallbackNames|getwd|gl|glm|glm.control|glm.fit|globalenv|graphics.off|gray|grep|grey|grid|gsub|gzfile|HairEyeColor|hasTsp|hat|heat.colors|help|help.search|help.start|Hershey|hist|hist.POSIXt|history|hsv|Hypergeometric|I|identical|identify|ifelse|Im|image|index.search|Inf|infert|influence.measures|inherits|InsectSprays|INSTALL|install.packages|installed.packages|integer|integrate|interaction|interaction.plot|interactive|intersect|inverse.gaussian|inverse.rle|invisible|IQR|iris|iris3|is.array|is.atomic|is.call|is.character|is.complex|is.data.frame|is.double|is.element|is.empty.model|is.environment|is.expression|is.factor|is.finite|is.function|is.infinite|is.integer|is.language|is.list|is.loaded|is.logical|is.matrix|is.mts|is.na|is.na.POSIXlt|is.name|is.nan|is.null|is.numeric|is.object|is.ordered|is.pairlist|is.qr|is.R|is.real|is.recursive|is.single|is.symbol|is.table|is.ts|is.unsorted|is.vector|isIncomplete|islands|ISOdate|ISOdatetime|ISOLatin1|isOpen|isSeekable|Japanese|jitter|jpeg|julian|kappa|kronecker|La.eigen|La.svd|labels|lapply|layout|lbeta|lchoose|lcm|legend|length|LETTERS|letters|levels|lgamma|library|library.dynam|licence|license|LifeCycleSavings|limitedLabels|lines|lines.formula|lines.histogram|lines.ts|link.html.help|list|list.files|lm|lm.fit|lm.influence|lm.wfit|load|loadhistory|local|localeconv|locales|locator|log|log10|log1p|log2|logb|Logic|logical|Logistic|logLik|logLik.glm|logLik.lm|loglin|Lognormal|longley|lower.tri|lowess|ls|ls.diag|ls.print|ls.str|lsf.str|lsfit|Machine|machine|MacRoman|mad|mahalanobis|make.link|make.names|make.packages.html|make.search.html|make.socket|makepredictcall|makepredictcall.poly|manova|margin.table|mat.or.vec|match|match.arg|match.call|match.fun|Math|Math.POSIXlt|Math.POSIXt|matlines|matmult|matplot|matpoints|matrix|max|max.col|mean|mean.POSIXct|mean.POSIXlt|median|mem.limits|Memory|memory.limit|memory.profile|memory.size|menu|merge|Methods|methods|min|missing|Mod|mode|model.extract|model.frame|model.matrix|model.matrix.glm.null|model.matrix.lm|model.offset|model.response|model.tables|model.weights|month.abb|month.name|months|morley|mosaicplot|mtcars|mtext|mvfft|n2mfrow|NA|na.action|na.exclude|na.fail|na.omit|na.omit.ts|na.pass|name|names|NaN|napredict|naprint|naresid|nargs|native.enc|nchar|nclass.FD|nclass.scott|nclass.Sturges|NCOL|ncol|NegBinomial|new.env|newestVersion|NextMethod|nextn|nhtemp|nlevels|nlm|noquote|Normal|NotYetImplemented|NotYetUsed|NROW|nrow|numeric|object.size|objects|offset|old-piechart|old.packages|on.exit|open|Ops|Ops.POSIXct|Ops.POSIXlt|Ops.POSIXt|Ops.ts|optim|optimise|optimize|options|OrchardSprays|order|ordered|outer|p.adjust|package.contents|package.dependencies|package.description|package.skeleton|packageStatus|page|pairlist|pairs|pairs.formula|palette|panel.smooth|par|Paren|parent.env|parent.frame|parse|paste|path.expand|pbeta|pbinom|pbirthday|pcauchy|pchisq|pdf|pentagamma|persp|pexp|pf|pgamma|pgeom|phones|phyper|pi|pico|pictex|pie|piechart|pipe|PlantGrowth|Platform|plnorm|plogis|plot|plot.new|plot.POSIXct|plot.POSIXlt|plot.window|plotmath|pmatch|pmax|pmin|pnbinom|png|pnorm|points|points.formula|Poisson|poisson|poly|polygon|polym|polyroot|pos.to.env|POSIXct|POSIXlt|postscript|power|ppoints|ppois|precip|predict|preplot|presidents|pressure|pretty|prettyNum|print|print.POSIXct|print.POSIXlt|print.SavedPlots|prmatrix|proc.time|prod|profile|proj|prompt|prop.table|ps.options|psignrank|pt|ptukey|punif|pushBack|pushBackLength|pweibull|pwilcox|q|qbeta|qbinom|qbirthday|qcauchy|qchisq|qexp|qf|qgamma|qgeom|qhyper|qlnorm|qlogis|qnbinom|qnorm|qpois|qqline|qqnorm|qqplot|qr|qr.Q|qr.qty|qr.qy|qr.R|qr.resid|qr.solve|qr.X|qsignrank|qt|qtukey|quakes|quantile|quarters|quasi|quasibinomial|quasipoisson|quit|qunif|quote|qweibull|qwilcox|R.home|R.Version|R.version|rainbow|Random.user|randu|range|rank|rbeta|rbind|rbinom|rcauchy|rchisq|Rconsole|Rd2dvi|Rd2txt|Rdconv|Rdevga|Rdindex|Re|read.00Index|read.table|readBin|readChar|readline|readLines|real|Recall|recordPlot|recover|rect|reformulate|reg.finalizer|regexpr|relevel|REMOVE|remove|remove.packages|removeCConverter|removeTaskCallback|Renviron.site|rep|replace|replayPlot|replications|require|reshape|resid|residuals|restart|return|rev|rexp|rf|rgamma|rgb|rgeom|rhyper|rivers|rle|rlnorm|rlogis|rm|rnbinom|RNG|RNGkind|rnorm|round|round.difftime|round.POSIXt|row|row.names|rowMeans|rownames|rowsum|rowSums|rpois|Rprof|Rprofile|rsignrank|rstandard|rstudent|rt|rug|runif|rweibull|rwilcox|R_LIBS|SafePrediction|sample|sapply|save|savehistory|savePlot|scale|scan|screen|sd|Sd2Rd|se.contrast|search|searchpaths|seek|segments|select.list|seq|seq.POSIXt|sequence|set.seed|setCConverterStatus|setdiff|setequal|setwd|shell|shell.exec|SHLIB|showConnections|sign|signif|SignRank|sin|single|sinh|sink|sleep|socketConnection|solve|sort|sort.list|source|Special|spline|splinefun|split|split.screen|sprintf|sqrt|stack|stack.loss|stack.x|stackloss|stars|start|Startup|stat.anova|state|stderr|stdin|stdout|stem|step|stop|stopifnot|storage.mode|str|str.logLik|str.POSIXt|strftime|strheight|stripchart|strptime|strsplit|structure|strwidth|strwrap|sub|Subscript|subset|substitute|substr|substring|sum|Summary|summary|Summary.POSIXct|summary.POSIXct|Summary.POSIXlt|summary.POSIXlt|sunflowerplot|sunspots|svd|sweep|swiss|switch|symbol.C|symbol.For|symbols|symnum|Syntax|sys.call|sys.calls|sys.frame|sys.frames|sys.function|Sys.getenv|Sys.getlocale|Sys.info|sys.load.image|Sys.localeconv|sys.nframe|sys.on.exit|sys.parent|sys.parents|Sys.putenv|sys.save.image|Sys.setlocale|Sys.sleep|sys.source|sys.status|Sys.time|Sys.timezone|system|system.file|system.time|t|table|tabulate|tan|tanh|tapply|taskCallbackManager|TDist|tempfile|termplot|terms|terms.formula|terms.object|terms.terms|terrain.colors|tetragamma|text|textConnection|time|Titanic|title|tolower|ToothGrowth|topo.colors|toString|toupper|trace|traceback|transform|trees|Trig|trigamma|trunc|trunc.POSIXt|truncate|try|ts|tsp|Tukey|TukeyHSD|type.convert|typeof|UCBAdmissions|unclass|undebug|Uniform|union|unique|uniroot|unix|unix.time|unlink|unlist|unname|unsplit|unstack|untrace|unz|update|update.formula|update.packages|update.packageStatus|upgrade|upper.tri|url|url.show|USArrests|UseMethod|USJudgeRatings|USPersonalExpenditure|uspop|VADeaths|var|variable.names|vector|version|vi|volcano|warning|warnings|warpbreaks|weekdays|Weibull|weighted.mean|weighted.residuals|weights|weights.glm|weights.lm|which|which.max|which.min|Wilcoxon|win.graph|win.metafile|win.print|win.version|WinAnsi|winDialog|winDialogString|window|windows|winMenuAdd|winMenuAddItem|winMenuDel|winMenuDelItem|with|women|write|write.dcf|write.ftable|write.socket|write.table|writeBin|writeChar|writeLines|X11|x11|xedit|xemacs|xfig|xinch|xor|xpdrows.data.frame|xtabs|xy.coords|xyinch|xyz.coords|yinch|zapsmall|zip.file.extract|zip.unpack|.Autoloaded|.AutoloadEnv|.BaseNamespaceEnv|.C|.Call|.Class|.Deprecated|.Device|.Devices|.Dyn.libs|.External|.find.package|.First|.First.lib|.Fortran|.Generic|.GlobalEnv|.Group|.Internal|.Last|.Last.lib|.Last.value|.leap.seconds|.lib.loc|.libPaths|.Library|.Machine|.Method|.NotYetImplemented|.NotYetUsed|.Options|.packages|.Pars|.path.package|.Platform|.PostScript.Options|.Primitive|.primTrace|.primUntrace|.ps.prolog|.Random.seed|.Renviron|.Rprofile|.Script|.Traceback)>":::Rbase::\n\
       assign:"\\<\\-|\\-\\>":::Rassign::\n\
       operators:"\\+|\\-|\\*|/|\\&|\\^|==|:|!=|!|\\||\\?|~|\\$|_|%%|%\\*%|%o%|%x%|%in%|%/%|\\<|\\>|=":::Roperators::\n\
       blocks:"\\(|\\)|\\{|\\}|\\[|\\]":::Rblocks::\n\
       args:"""":""""::Rargs::\n\
       NA:"<(NULL|NA|NaN|TRUE|FALSE|T|F)>":::RNA::\n\
}

nedit.languageModes: 	R:.r .R .q::Auto:Continuous:::\n\

nedit.styles:	Rnote:red3:Italic\n\
	RKeyword:black:Bold\n\
	Roop:black:Bold\n\
	Rbase:SteelBlue4:Plain\n\
	Rblocks:red4:Bold\n\
	Rassign:orange2:Bold\n\
	RComment:blue4:Plain\n\
	Roperators:red1:Bold\n\
	RNA:DarkBlue:Bold\n\
	Rargs:DarkGreen:Italic\n\

