GNU Octave syntax highlighting files repository

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GNU Octave syntax highlighting files repository

José Luis García Pallero
Hello,

I've created a mercurial repository in bitbucket in order to store
syntax highlighting files for use Octave language with multiple text
editors. By the moment I have files for CodePad (an discontinued MS
Windows program), nano, vim and Kate/KWrite. It would be nice if
someone in the community could contribute with other files for editors
as gedit, jedit, geany, etc.

The code is stored in https://bitbucket.org/jgpallero/octave-sh. The
repo can be anonymously cloned and I have not problem to provide write
access to it to someone that want to contribute.

The highlighted data are separated in four groups:

- keywords, as if, for, etc
- commands, as cd, who, save, etc. (this group could be deleted and
merged with the next, I don't know)
- functions
- forge, for Octave-Forge functions

The three first classes corresponds to the state of Octave 3.0.1 and
the forge corresponds to the state of octave-forge 20080612.

For Octave developers: Could be possible to implement a function
called function_names() or similar in order to obtain a list with all
the Octave function names, keywords, etc.?

--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

GNU Octave syntax highlighting files repository

John W. Eaton
Administrator
On  3-Nov-2011, José Luis García Pallero wrote:

| For Octave developers: Could be possible to implement a function
| called function_names() or similar in order to obtain a list with all
| the Octave function names, keywords, etc.?

You could try __list_functions__.

How accurate do you expect highlighting to be?

Suppose you write some perfectly valid code like this:

  save foo.dat bar

  save ("foo.dat", "baz")

  save = 1;

  save

  clear save

  save ("foo.dat")

On which of the lines above should "save" be highlighted as a command,
a function, or a variable?  Once a symbol has been used as a variable
in a given function or script, I suppose it should afterward be
highlighted as a variable unless it is cleared.  What if the clearing
is done with something like

  names_to_clear = {"save", ...};

  clear (names_to_clear{:})

?

:-)

jwe
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave