Hspeak Notepad ++ Language?

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Hspeak Notepad ++ Language?

Post by Taco Bot »

Okay, so some of you probably know that in Notepad ++ you can define your own languages. I was just wondering if anyone has already ported HSpeak to it, and if so, if they could lend me the .XML file for it.
Sent from my iPhone
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

not a bad idea.

I just use notepad no pluses for my Hspeak, though.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

I used to do the same, but then I realized the awesomeness of open/close parentheses becoming highlighted in Notepad++. It makes spotting open/close script errors a piece of cake.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

I tried looking into it but just could find absolutely no documentation online on notepad++'s language definition format, only that it's called UDL2. The website is full of broken links to a wiki on sourceforge which has been deleted.

We have a XML language definition file for HamsterSpeak for gtksourceview, which is used in the HamsterWhisper script editor, which is work in other programs using gtksourceview, but Notepad++ isn't one of them
User avatar
Mogri
Super Slime
Posts: 4668
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

I used to have a N++ language definition that I'd created for Hamsterspeak. It wasn't what you would call rigorous, and Hamsterspeak is probably too fluid to be fully N++-supported anyway.

I find that the default N++ handling is convenient enough for script editing anyway.
User avatar
foreverblue2
Red Slime
Posts: 30
Joined: Thu Feb 28, 2013 6:33 pm
Location: seattle

Post by foreverblue2 »

This is a small picture of what I have. I took the contents of the dictionary and copied it into the language editor thingy for notepad++. I had to remove the space between the words to make it work right. So "key is pressed" I write as "keyIsPressed" so it highlights correctly. I didn't know what I was doing so I can't really explain it better. It took me about 2 hours. If you want, tell me how to find the file that makes it work and I'll email it to you. I honestly wouldn't do with out it so I would love to help you out. I just don't know what I'm looking for. Everything highlights to appropriate colors except for true and false which highlight to different colors, green and red, respectively.
Attachments
Untitled.png
Untitled.png (133.92 KiB) Viewed 3321 times
User avatar
foreverblue2
Red Slime
Posts: 30
Joined: Thu Feb 28, 2013 6:33 pm
Location: seattle

Post by foreverblue2 »

Here's kinda a better picture. Kinda.
Attachments
Untitle9d.png
Untitle9d.png (142.39 KiB) Viewed 3317 times
User avatar
Mystic
Metal Slime
Posts: 322
Joined: Wed Jul 23, 2008 4:32 am

Post by Mystic »

i have one as well. i actually have certain colors for things that aren't actually in the hspeak definition. for example, i have all slice functions highlighted with a particular color.

it's not too hard to define one with the cool editor that new versions of notepad++ have.
User avatar
BMR
Metal King Slime
Posts: 3310
Joined: Mon Feb 27, 2012 2:46 pm
Location: The Philippines
Contact:

Post by BMR »

From what I recall of N++, there's a GUI option to just plug in commands and stuff and then set the highlight or color or whatever for said commands. It'd be tedious, but certainly not difficult, to just manually go through the plotscript dictionary and add them one by one if you really want to.

As for me, I use Gedit to get my syntax highlighting and stuff.
Being from the third world, I reserve the right to speak in the third person.

Using Editor version wip 20170527 gfx_sdl+fb music_sdl
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Cool! Highlighting different groups of commands different colours is a rather neat idea. It would be nice if those definition files were put on the wiki, but I'm not a Notepad++ user and don't know how it works.

I use emacs. I wrote a custom indentation mode which handles all of HS, FreeBasic and Euphoria (the language HSpeak is written in) since by no coincidence there's a lot of overlap between them. But it doesn't do highlighting and I hope to add that at some point.
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

BMR wrote:From what I recall of N++, there's a GUI option to just plug in commands and stuff and then set the highlight or color or whatever for said commands. It'd be tedious, but certainly not difficult, to just manually go through the plotscript dictionary and add them one by one if you really want to.

As for me, I use Gedit to get my syntax highlighting and stuff.
Yeah, I know I could do that, but I was hoping to use that weird, funky, XML method to save some time. Not really asking if someone could make one, just if someone already had one handy.
Sent from my iPhone
Post Reply