|
From: | Mike Miller |
Subject: | Re: nano syntax highlighting for Octave? |
Date: | Sat, 13 Mar 2010 16:44:05 -0600 (CST) |
User-agent: | Alpine 2.00 (DEB 1167 2008-08-23) |
On Sat, 13 Mar 2010, Mike Miller wrote:
On Wed, 10 Mar 2010, Ben Abbott wrote:On Wednesday, March 10, 2010, at 02:47PM, "Mike Miller" <address@hidden> wrote:I'm really more of an Emacs guy, but for students I recommend Nano to get them started. I've been working on getting the syntax highlighting to work for various kinds of scripts. I found something for R and modified it to produce what you see below (don't blame Haptonstahl if anything is broken in that code because it might be my fault). I think it works fairly well but there is definitely room for improvement.Of course I'd like some nano syntax highlighting code for Octave and/or MATLAB if anybody out here has worked on that. Thanks in advance.I haven't tried it, but a Google turned this link up. http://savannah.gnu.org/patch/?6798Thanks, Ben. I'm sure that will help. I think I was searching too much for Octave and not enough for MATLAB.I'll edit that file and send it to the list.
I played around a little with the code I found at the URL above and created the attached text file. 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. Also see the attached screenshot PNG file.
It looks nice now (I'm using xterm with white on black and haven't tested with black on white), but I know it is still a little messed up -- I can see that some functions are repeated and I'm sure others are missing. I don't have time to work on it much now. I don't know how to retrieve lists of different types of functions, or even if there is a way to do that.
Nano is Free Software. It is pretty lightweight and useful as a viewer. Just use the -v option to turn off editing functionality:
nano -v file.m Best, Mike
octave_nanorc.txt
Description: Text document
nano_octave.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |