Language definitions for syntax highlighting in Notepad++

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Fib Gibbley
Posts: 13
Joined: Fri Aug 08, 2008 11:33 pm

Language definitions for syntax highlighting in Notepad++

Post by Fib Gibbley » Tue Jun 09, 2009 2:19 pm

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

User avatar
B00daW
Posts: 584
Joined: Thu Jan 03, 2008 1:48 pm

Post by B00daW » Wed Jun 10, 2009 8:57 am


Fib Gibbley
Posts: 13
Joined: Fri Aug 08, 2008 11:33 pm

Post by Fib Gibbley » Wed Jun 10, 2009 11:06 am

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.

User avatar
miau
Posts: 184
Joined: Mon Nov 06, 2006 9:34 am
Location: Potsdam, Germany
Contact:

Post by miau » Thu Jun 11, 2009 12:28 am

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

User avatar
MetalSlime
Posts: 186
Joined: Tue Aug 19, 2008 11:01 pm
Location: Japan

Post by MetalSlime » Thu Jun 11, 2009 1:19 am

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!
MetalSlime runs away.

mic_
Posts: 922
Joined: Thu Oct 05, 2006 6:29 am

Post by mic_ » Thu Jun 11, 2009 1:34 am

So, if people are actually using Notepad++...
Speaking of which; is there an MML syntax definition file for TextPad?

User avatar
Banshaku
Posts: 2334
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Post by Banshaku » Thu Jun 11, 2009 2:15 am

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.

User avatar
miau
Posts: 184
Joined: Mon Nov 06, 2006 9:34 am
Location: Potsdam, Germany
Contact:

Post by miau » Thu Jun 11, 2009 6:36 am

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: Select all

<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: Select all

<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.

User avatar
Banshaku
Posts: 2334
Joined: Tue Jun 24, 2008 8:38 pm
Location: Fukuoka, Japan
Contact:

Post by Banshaku » Thu Jun 11, 2009 7:52 am

@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.

User avatar
Dafydd
Posts: 114
Joined: Sun Mar 16, 2008 1:45 am
Location: Uppsala, Sweden

Re: Language definitions for syntax highlighting in Notepad+

Post by Dafydd » Wed Feb 27, 2013 4:14 pm

Sorry to bump such an old thread, but does anyone still have those files? The links are all dead.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Language definitions for syntax highlighting in Notepad+

Post by thefox » Wed Feb 27, 2013 6:46 pm

This thread has some other stuff: viewtopic.php?f=5&t=6267

My (old) syntax highlighter is also there.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

zzo38
Posts: 1063
Joined: Mon Feb 07, 2011 12:46 pm

Re: Language definitions for syntax highlighting in Notepad+

Post by zzo38 » Wed Feb 27, 2013 9:37 pm

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.
[url=gopher://zzo38computer.org/].[/url]

User avatar
Dafydd
Posts: 114
Joined: Sun Mar 16, 2008 1:45 am
Location: Uppsala, Sweden

Re: Language definitions for syntax highlighting in Notepad+

Post by Dafydd » Thu Feb 28, 2013 11:11 am

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.
Last edited by Dafydd on Sat Apr 13, 2013 7:27 am, edited 1 time in total.

User avatar
Movax12
Posts: 522
Joined: Sun Jan 02, 2011 11:50 am

Re: Language definitions for syntax highlighting in Notepad+

Post by Movax12 » Thu Feb 28, 2013 11:39 am

Probably best to use fixed/monospace fonts if you use indentation to line up code.

User avatar
Guilty
Posts: 93
Joined: Fri Apr 08, 2016 5:58 pm
Location: California, USA

Re: Language definitions for syntax highlighting in Notepad+

Post by Guilty » Thu Apr 28, 2016 9:45 pm

Aw man, all the 6502 language definition files for notepad++ online are dead links...

Post Reply