Laserbrain Studios

Games Forum Blog Contact

Author Topic: Syntax highlight your quest-scripts!  (Read 5219 times)

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Syntax highlight your quest-scripts!
« on: July 26, 2009, 05:51:12 PM »
If you're using a Linux distribution which uses the Gnome-desktop, you can now download a syntax highlighting-language for the default gnome-editor gedit in the "Extra Stuff"-section. Installation instructions are in the header of the file.
 
http://www.asciisector.net/extra/asciisec.lang

The picture below shows it on my computer, which uses a "dark theme", but it will work just as well on a normal default theme.

(I've had thoughts of putting something similar together for VIM, which is a editor that would also work on Windows (and Linux, Mac, Amiga).)
 
Hope you like it.


Cort

  • Veteran
  • *****
  • Posts: 232
    • View Profile
    • http://henrik.heimbuerger.de/
Re: Syntax highlight your quest-scripts!
« Reply #1 on: July 26, 2009, 06:55:12 PM »
Very cool stuff. I'm neither using gedit nor writing quests right now, but tools being created is always a good sign of a healthy community. :)

Does this also provide auto-complete? On the keywords, in particular?


-- Cort

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #2 on: July 26, 2009, 08:01:10 PM »
Quote
Does this also provide auto-complete? On the keywords, in particular?


No, I don't think gedit supports that.
I think VIM will support it, if I, or someone else, makes a similar thing for it.

VincentFirePony

  • Ace
  • *****
  • Posts: 1236
    • View Profile
    • http://pgmaille.weebly.com
Re: Syntax highlight your quest-scripts!
« Reply #3 on: August 21, 2009, 07:11:55 PM »
Dare I ask if something like that could be made available for us Windows users? I probably ask for much but it would be nice...
There are only a few good things in life: AS, AS, beer, Minecraft and Hostile Takeover! A<0>V

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #4 on: August 21, 2009, 07:52:26 PM »
I might do something like this for VIM, which will work under windows, but hey, if you're really into quest-scripting why not join the Rebel alliance (=Linux) and fight the evil Empire (=Microsoft)?

This is your perfect opportunity!

Flyboy

  • Veteran
  • *****
  • Posts: 956
    • View Profile
    • http://www.daniel.peranoranch.com
Re: Syntax highlight your quest-scripts!
« Reply #5 on: August 23, 2009, 07:54:08 AM »
Can't argue with that :lol: ! Please note that my avatar is Tux (the Linux mascot) in the process of swatting the MSN butterfly.

No way... VIM works on Windows?

Jetforcesoldier

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #6 on: August 24, 2009, 02:30:16 AM »
Sorry to lazy to switch to Linux besides, my dad has enough problems with me using Firefox apparently. (for some reason he hates Firefox)So take a guess what would happen if I even told him I was thinking about Linux.
Rawr, I\'m a monstah rawr.

VincentFirePony

  • Ace
  • *****
  • Posts: 1236
    • View Profile
    • http://pgmaille.weebly.com
Re: Syntax highlight your quest-scripts!
« Reply #7 on: August 24, 2009, 02:48:32 AM »
So much of what i use needs microsoft tho... Where can I go to into linux? and would it support microsoft office? I need that for school....
There are only a few good things in life: AS, AS, beer, Minecraft and Hostile Takeover! A<0>V

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #8 on: August 24, 2009, 11:05:18 AM »
Quote
Where can I go to into linux?

This is a big question, so meet me at:
http://www.asciisector.net/forum/viewtopic.php?p=4152#4152

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #9 on: June 29, 2010, 04:41:21 PM »
NEW VERSION
I've updated the syntax highlighting language for the quest-scripting function in asciisector to include the latest changes to the language (up until v0.6.6.3). I also corrected two or three minor mistakes with trailing spaces that left the so vital word "Kamekh" uncolored in the previous version. :)

If you haven't bothered with reading the above posts, then this is for gedit, and will work in all Gnome-desktops (such as Ubuntu), and all editors derived from gedit, and you can get it from: http://www.asciisector.net/extra/asciisec.lang

Below are few more screenshots of how it looks on my computer, with "normal theme" and the one I'm currently using ("terminus" I think it's called)




Installation for the Lazy Linux user:
Code: [Select]

wget http://www.asciisector.net/extra/asciisec.lang
sudo mv asciisec.lang /usr/share/gtksourceview-2.0/language-specs/asciisec.lang


Please let me know if something isn't working right. Either install-wise, or things that wont get colored properly.

cessna

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #10 on: August 25, 2011, 12:05:05 PM »
For those of you who may not wish to switch to Linux, gedit works perfectly in Windows and I would recommend replacing notepad with it anyway as it is far superior.  As a Linux user I almost never boot into my Windows partition but found that I must just to play asciisector as it runs extremely slowly on my linux side for some reason which is strange since most of the games I play run better in linux (usually in dosbox).  The current link for gedit Windows binary follows but I would recommend going to gedit.org and getting the latest version and consider donating to the wonderful gedit project:

http://ftp.gnome.org/pub/GNOME/binaries/win32/gedit/2.30/gedit-setup-2.30.1-1.exe

To add a new language, simply drop the .lang file in Program Files (or wherever you installed gedit)/gedit/share/gtksourceview-2.0/language-specs

and in gedit hit the down arrow next to plain text and select AsciiQuest.

Though I do highly recommend open source software like linux, I understand how daunting it may be to switch from something well known to something unknown.  Fortunately, dual boot systems are now extremely easy to set up getting the best of both worlds and many of your favorite programs like gedit can be run wherever you find yourself booting at the time.

cessna

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #11 on: August 25, 2011, 12:08:52 PM »
Thank you Cthulhu!! I considered doing this myself but am very happy I do not need to (I was diehard Emacs until I fell in love with gedit and have never looked back).

Cthulhu

  • Ace
  • *****
  • Posts: 1371
    • View Profile
Re: Syntax highlight your quest-scripts!
« Reply #12 on: August 25, 2011, 01:07:52 PM »
Thank you!
To my knowledge you're the first one to use it, since I made it two years ago, other than myself
Quote from: "cessna"

I was diehard Emacs until I fell in love with gedit and have never looked back

I'm the opposite! I used gedit, then learned Emacs, and loving it. I do all my programming (C++, Java, Python, Bash) in it and all my writing in LaTeX, not to mention org-mode, and all system configuration files, and... I should probably stop right now.

Glad you find it useful.   :)

EDIT: And welcome to the forum.