[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OctDev] GNU Octave syntax highlighting files repository
From: |
Carnë Draug |
Subject: |
Re: [OctDev] GNU Octave syntax highlighting files repository |
Date: |
Thu, 3 Nov 2011 18:20:21 +0000 |
2011/11/3 José Luis García Pallero <address@hidden>:
> 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 (a 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.
Wouldn't it be better if those files were actually maintained by the
text editors?
> 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-Forge maintainers: Could be possible to implement an option
> in the web that provides the octave-forge function names as in
> http://octave.sourceforge.net/functions_by_alpha.php but in plain text?
Here's a perl script to do what you want (you need to feed it the
source of the page):
my $filepath = shift;
open (SOURCE, "<", $filepath) or die "Couldn't open $filepath for
reading: $!\n";
while (<SOURCE>) {
while ($_ =~ m/<div class=\"func\"><b><a href=\".*?\">(.*?)<\/a>/g) {
say $1;
}
}
Carnë
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [OctDev] GNU Octave syntax highlighting files repository,
Carnë Draug <=