This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Language definitions for syntax highlighting in Notepad++

Language definitions for syntax highlighting in Notepad++
by on (#47839)
I used notepad++ to create a language definition file for ppmck mml. This means that as you type mml keywords, notepad++ will highlight the terms. I used four different colors, one for each classification of keyword. You have to download my userdefinelanguage.xml file and overwrite your file in notepad++.

Notepad++:
http://notepad-plus.sourceforge.net/uk/site.htm

A good tutorial to "install" my definition file:
http://weblogs.asp.net/jgalloway/archiv ... tepad.aspx

My userdefinelanguage file:
http://www.sendspace.com/file/2p55zl

by on (#47862)
http://truechiptilldeath.com/2009/06/mm ... r-notepad/

by on (#47864)
Thanks for spreading the word B00. This isn't a perfect script by far, so if anyone would like to go the last mile and clean it up before I do, it would be really cool of ya.

by on (#47884)
Hey, that's cool stuff. Definitely gonna be using it :)


So, if people are actually using Notepad++...

Thought I might as well (ab)use this thread to share my language definition file for 6502 asm
Includes syntax highlighting of ca65 pseudo functions and control commands.

This is how your code will look

by on (#47885)
miau wrote:
Hey, that's cool stuff. Definitely gonna be using it :)


So, if people are actually using Notepad++...

Thought I might as well (ab)use this thread to share my language definition file for 6502 asm
Includes syntax highlighting of ca65 pseudo functions and control commands.

This is how your code will look


I certainly hope my code never looks like that! :lol:

nice ldf though. I use Notepad++ and ca65 so I'll try it out!

by on (#47886)
Quote:
So, if people are actually using Notepad++...

Speaking of which; is there an MML syntax definition file for TextPad?

by on (#47887)
Is it possible to have 2 customs language with notepad++? I already have one that I made for my asm files and would not like to lose it.

MetalSlime wrote:
nice ldf though. I use Notepad++ and ca65 so I'll try it out!


I made one with Tokumaru that support ca65 and other assemblers (nesasm I think and other one, asm6?) . I tried to focus on making calm color for the eye so it look like this. I don't remember if I posted it on nesdev or not. I could always post it if anybody interested. (argg, we are stealing his thread.. Sorry!).

Edit:

@Miau: I like what you did for the branche instructions. that's a nice idea, didn't think about that.

by on (#47889)
Banshaku wrote:
Is it possible to have 2 customs language with notepad++? I already have one that I made for my asm files and would not like to lose it.

Yes, the userDefineLang.xml file in your Notepad++ directory should look like this right now:

Code:
<NotepadPlus>
    <UserLang name="your custom language" ext="">
    ...
    </UserLang>
</NotepadPlus>


To add the other languages just paste the UserLang tags from the other file(s) you want to install like this:

Code:
<NotepadPlus>
    <UserLang name="your custom language" ext="">
    ...
    </UserLang>
    <UserLang name="MML-PPMCK" ext="mml">
    ...
    </UserLang>
    <UserLang name="6502 ASM" ext="s">
    ...
    </UserLang>
</NotepadPlus>


Better create a backup of the original file, though, don't know how Notepad++ behaves if something goes wrong.


Banshaku wrote:
I made one with Tokumaru that support ca65 and other assemblers (nesasm I think and other one, asm6?) . I tried to focus on making calm color for the eye so it look like this. I don't remember if I posted it on nesdev or not. I could always post it if anybody interested. (argg, we are stealing his thread.. Sorry!).


I see what you mean by calm colors, looks neat.
Hmm, since there seems to be more "demand" for syntax highlighters for other editors... maybe our posts could be moved to a separate thread where everyone can post their language files. Or just continue with (or rename) this thread if it's fine with the original poster.


Banshaku wrote:
@Miau: I like what you did for the branche instructions. that's a nice idea, didn't think about that.

Other languages allow for easy highlighting of control structures (if, else, while, etc). This is somewhat similar and makes recognizing the code structure a bit easier. I think I couldn't do without it anymore :)


Needless to say, feel free to modify or merge anything with your own language files if you find mine useful.

by on (#47891)
@Miau: Thanks for the comment regarding the config settings.

miau wrote:
I see what you mean by calm colors, looks neat.
Hmm, since there seems to be more "demand" for syntax highlighters for other editors... maybe our posts could be moved to a separate thread where everyone can post their language files. Or just continue with (or rename) this thread if it's fine with the original poster.


Yes, I think we are heading for a thread split and it's the right thing to do. I will try to post my version later, once the thread is splitted.

Edit:

Like promised, here my definition since the thread as been changed/split:

Notepad ++ definition by Banshaku

The main goal of this definition was to have some relaxing colors so it wouldn't too hard on my eyes. Should work fine with ca65 and nesasm. How you write your code and comment it will have an impact on how it will look.
Re: Language definitions for syntax highlighting in Notepad+
by on (#108427)
Sorry to bump such an old thread, but does anyone still have those files? The links are all dead.
Re: Language definitions for syntax highlighting in Notepad+
by on (#108441)
This thread has some other stuff: viewtopic.php?f=5&t=6267

My (old) syntax highlighter is also there.
Re: Language definitions for syntax highlighting in Notepad+
by on (#108453)
Does it support the Improved ppMCK stuff that I have added? Do they have other MML such as XPMCK and VGMCK? There are probably others too, that I don't know about.
Re: Language definitions for syntax highlighting in Notepad+
by on (#108495)
thefox wrote:
This thread has some other stuff: viewtopic.php?f=5&t=6267

My (old) syntax highlighter is also there.

I dunno if it's just on my end, but that looks pretty awful, haha. What's with the extra line spacing?
EDIT: Oh, it was because of the differently sized fonts. Fixed.
Re: Language definitions for syntax highlighting in Notepad+
by on (#108497)
Probably best to use fixed/monospace fonts if you use indentation to line up code.
Re: Language definitions for syntax highlighting in Notepad+
by on (#169618)
Aw man, all the 6502 language definition files for notepad++ online are dead links...
Re: Language definitions for syntax highlighting in Notepad+
by on (#169621)
Here's the one I'm using. It contains keywords for ASM6 and ca65, I think.
Re: Language definitions for syntax highlighting in Notepad+
by on (#169622)
Tokumaru to the rescue.
Round the clock, the Brazilian with the answer.
Thanks again Toku.
Re: Language definitions for syntax highlighting in Notepad+
by on (#169626)
No problem. Hope you like my color choices... I seem to remember people disagreeing a little about that. :? Well, you can always customize what you don't like. :wink:
Re: Language definitions for syntax highlighting in Notepad+
by on (#169629)
Here's another one: https://github.com/fo-fo/ngin/blob/mast ... n-6502.xml
Re: Language definitions for syntax highlighting in Notepad+
by on (#169633)
I think this is the file in the previous post but I'm not 100% sure since it's been a while.

Hope it's help.
Re: Language definitions for syntax highlighting in Notepad+
by on (#179694)
Since it's been bumped after 2009, here's mine:
https://yadi.sk/d/2XYRHLZMvJzig