Old 24th May 2002, 17:53   #1
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Maki Syntax Highlighter for Crimson Editor

Hi all, I'm back again with my Crimson Editor evangelism! I made up a syntax highlighter for Maki in Crimson Editor. If you don't know what syntax highlighting is, see the examples:
Maki Code Without Syntax Highlighting
Maki Code With Syntax Highlighting

Simply download and install Crimson Editor. Then download and install my syntax files (NSIS'd for easy installation):
Maki Syntax Definitions for Crimson Editor

Now, just open up some maki source code and see the difference for yourself. You can change the colors to your liking in Crimson Editor's preferences.

I'm also including some helpful Crimson Editor user tool configurations...the first lets you compile directly to a maki byte-code file (blah.maki) from Crimson Editor, using a hotkey. The second lets you do the same with NSIS installers.
Maki User Tool (example preference)
NSIS User Tool (example preference)

When using the User Tools, you don't need to move the mc.exe compiler...it should stay in the Winamp3 root folder. If set up your settings exactly like mine, the compiled script or exe should show up next to the uncompiled source. Also, both of makis include methods should work (#include <blah> and # include "blah")...it's up to you to be sure you have the correct locations.

I'll eventually release a NSIS syntax file too, so I figured that compiling NSIS installers in C.E. would be useful. Using all of the above, you can turn Crimson Editor into a virtual IDE for Nullsoft products!

Be sure to let me know your results, and if you find any errors feel free to post them here. Suggestions and questions also welcomed!

Cheers,
-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.

Last edited by Gonzotek; 24th May 2002 at 20:01.
Gonzotek is offline   Reply With Quote
Old 24th May 2002, 18:51   #2
omarello
Major Dude
 
omarello's Avatar
 
Join Date: Feb 2001
Location: ---- Montreal ---- Canada ----
Posts: 529
a long time ago there was this prog that highlights XML text alson in crimson editor.

my question is will both work now if i install urs, or will there be a conflict

the other prog is found here

Shoot me again I ain't dead YET
omarello is offline   Reply With Quote
Old 24th May 2002, 18:57   #3
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Both will work. The maki syntax code is seperate from the xml. I also plan on updating that syntax as well, when I get the chance, and if the original author has no objections.

I'm sure there won't be a conflict, though, because I'm using both. Crimson Editor uses the file extension to determine whice highlighter to use....which does lead to one small problem...by default, C.E. uses .m for mathlab files. So if you're a mathlab coder and a maki coder (how many could there be?) then this might be a conflict for you. This is noted in the installer before you're allowed to install over the mathlab files. If anyone actually has that problem, contact me and I can suggest some workarounds.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 24th May 2002, 23:24   #4
omarello
Major Dude
 
omarello's Avatar
 
Join Date: Feb 2001
Location: ---- Montreal ---- Canada ----
Posts: 529
me likes it.
me recomends it.

thanx

Shoot me again I ain't dead YET
omarello is offline   Reply With Quote
Old 24th May 2002, 23:41   #5
Plague
f(caffeine){
return wasabi;
}
(Forum King)
 
Plague's Avatar
 
Join Date: Jul 2001
Location: Sweden
Posts: 3,984
just tried it out..
Looks good.
Very useful.

So much easier to get a decent overview than in Notepad..
Although, Notepad kinda roxors too

good work Gonzo

-Plague
Plague is offline   Reply With Quote
Old 15th August 2002, 15:17   #6
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
In Crimson Editor 3.45 (latest), under the Document menu, there's a Syntax submenu. You can configure Maki to be on the menu, then just switch it on when you're editing a maki script. I think the problem is that the .m extension is already used by TWO other syntax definitions in Crimson Editor, so he had to figure some way to overload extensions while still allowing the user to choose which syntax he wants to use.

When I have more time, I'll make new screenshots to explain how to set things up in CE 3.45. And I'll update the definition to include the newer objects and commands (like findObject() ).

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 15th August 2002, 16:17   #7
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
You have to add it to the menu. Click configure at the bottom.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 15th August 2002, 16:21   #8
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
I also just discovered that you can have it automatically open .m files with the maki syntax by overwriting the extension.m file (in the links folder in crimson editor's directory).

Old extension.m:
LANGSPEC:MATLAB.SPC
KEYWORDS:MATLAB.KEY

new extension.m:
LANGSPEC:MAKI.SPC
KEYWORDS:MAKI.KEY

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Old 15th August 2002, 22:25   #9
PJay Tycy
Senior Member
 
Join Date: Jan 2002
Posts: 252
Nice !!

I found some freeware editors yet, but they all had prebuild language recognition, and no way to add your own. This Crimson Editor sounds good to me (I haven't tested it yet though).
For the xml-language-extensions: when you say you might update them, do you mean they'll work for all xml, or they'll work for winamp3?
The only difference in the various xml-types I see are the used keywords, the rest of the syntax is always the same I guess?
PJay Tycy is offline   Reply With Quote
Old 15th August 2002, 22:54   #10
Gonzotek
Gunslinger
 
Gonzotek's Avatar
 
Join Date: May 2000
Location: Terminus
Posts: 4,693
Since Crimson Editor doesn't have any kind of xml parsing, and probably never will, I could only do a Winamp3-specific xml highlighter. And yes, XML is just markup, everything else is up to the programmer to decide how to implement.

-=Gonzotek=-

I was away for a while.
But I'm feeling much better now.
Gonzotek is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump