Ah, I understand. nano loads a config file when it starts, so if a file's extension matches any of the ones defined in the config file, it then loads the appropriate syntax.
As to what I decided to hilight. That was a completely personal  
issue, and since it was my first (and only) attempt at using regex,  
I'm sure it could be improved. But, I limited myself to the following  
(in increasing order of importance, since if something fits two  
definitions, nano will use the one defined later in the config file:
• expressions within curly braces
• chords (expressions within angle-brackets)
• simultaneous expressions (expressions within double angle-brackets) (note, these last two don't really work very well together, apparently I'd need a parser in order to separate something like << <> >> which can exist and quite often does exist in a lilypond file. It was enough for me to simply have them colored differently so I could see them easily.)
• slurs and phrasing slurs
• articulations
• music functions (anything starting with a leading \ )
• note names
• dynamics
• notes beamed together
• anything within quotation marks
• Scheme expressions
• comments

You may find different things important to you. My regex is far from perfect, but, it exists, and it means that I don't have to learn another editor. And if something doesn't please me in the way the syntax hilighting works, I know how to change it.
On 19.08.2009, at 18:22, -Eluze wrote:


James E. Bailey-3 wrote:
 No searching, or maybe I misunderstand what you mean.

i guess you had to apply this regex to a file or files - were these  
all
lilypond (program-) files or did you go thru the docs or what?
 an additional question of course is, if you found *all* lilypond
expressions, functions or whatever - how many results did you get?

tia
--
View this message in context: http://www.nabble.com/Lilypond- language-definition-for-Notepad%2B%2B-tp14969868p25047406.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
James E. Bailey



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to