I love R, and I'm a real ggplot2 nut ... but writing complex programs in the R console, or the built-in editor, has never been my thing. Enter TextMate — its a great editor for writing R scripts in OS X. By using TextMate as your R editor you get a lot of niceties such as syntax highlighting, multiple carets, jump bars for navigating the workspace, code completion, code folding, and much more.