FYI... ---------- Forwarded message ---------- Date: Sat, 13 Mar 2010 19:34:44 -0600 (CST) From: Mike Miller To: R-Help List <r-help at stat.math.ethz.ch> Subject: nano syntax highlighting for R Nano is Free Software and a nice intro text editor. It also starts up very quickly and has good syntax highlighting functionality, so it makes a nice file viewer. The syntax highlighting is configured in the ~/.nanorc file. See the attached code and screenshot. I was looking for good nano syntax highlighting code for R when I found by Stephen Haptonstahl's code here: http://srh.ucdavis.edu/drupal/node/20 He is happy for others to use the code, modify it and distribute it. My edited version of his code is attached. To use it, just append it to your ~/.nanorc file. There's also a systemwide way to use it, but I don't know offhand. To use nano in a view-only mode, just use the -v option to turn off editing functionality: nano -v file.R The .R file extension will cause Nano to use the R syntax highlighting, but it can also be triggered with the -Y option: nano -v -Y R file.whatever Of course, nano also is an editor, so just drop the -v option if you want to edit a file. The screenshot looks pretty nice now (I'm using xterm with white on black and haven't tested with black on white), but I'm sure it can be improved further. I don't have time to work on it much now, but maybe someone else will want to pick it up. Best, Mike -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: R_nanorc.txt Url: http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20100313/fe5b6116/attachment-0001.txt -------------- next part -------------- A non-text attachment was scrubbed... Name: nano_R.png Type: image/png Size: 35111 bytes Desc: Url : http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20100313/fe5b6116/attachment-0001.png