LordGregGreg
2007-06-22 05:37:48
Ok, this is my first tut, so bear with me.
This is NOT a tut about jEdit, there are PLENTY of those, like this one http://www.jedit.org/index.php?page=quickstart
Here we go, this tut will teach you how to set up jedit to work and navigate scar files. Because scar is an extension of an old language (pascal) it's slightly more tricky than you would expect.
Why do you want to do this? Here is why.(picture below for visual)
Jedit is a fancy little editor that will color code your text for you, and highlight key words and stuff. It can also give you a handy organization bar to easily see your functions and navigate to them, as well as allowing begins-ends to be collapsed down to help you look at your code better.
bigger immage is here http://farm2.static.flickr.com/1242/586915781_a414a8e956_o.jpg
Beautiful isnt it? The only think it doesnt do is the context sensitive help like scar does, but it tries lol.
Ok, first, you need to have java installed. You will need at least the java runtime http://java.sun.com/j2se/1.5/
Thats not even hard, if you can't get it to work, google it.
Second, you need to get Jedit.
It's right here http://www.jedit.org/ and the download link is here
http://www.jedit.org/index.php?page=download
I installed mine to "C:/program files/jedit/"
so keep that in mind for reference
Ok, good, simple enough.
Now here is where the fun comes in. We need to get some plugins, and to do that, we need to get the plugin mirror to work.
Go to General Options –> Plugin Manager –> Update Miror List
Like this.

Ok, now we can start downloading some plugins.
Here is a note about them, read what they do before you download them. I erased all my scar files because I rushed through this part.
Here I have listed the plugins that are a must. They have a red arrow next to them.



Good, now , shut down jedit NOW.
I know you want to play around with the plugins, but just listen to me and do it. SHUT it down, and then RESTART IT
Good, now, lets get some stuff to start working.
First off, lets make sure that jedit recognizes scar files
Set up this page like I have! Folow the arrows!
To get here go to general options>editing>pascal

Make sure that you
unchecked to use default settings,
checked soft tabs
added ",scar" to the file name glob
Oh, and CHANGE FOLDING MODE TO CUSTOM
Ok, good, now lets set up ctabs sidekick
GO to plugin options>ctags sidekick

Yep, you need to go to http://ctags.sourceforge.net and download the ZIP file of the latest realease.
Unzip that file to your jedit folder, (mine was C:\program files\jedit\ctags56")
Add whatever path that is to the .exe file you downloaded as shown above!
Good…
Now! Lets open up side kick. You do this folowing the chain I did. After it is open, RIGHT CLICK, and choose DOCK TO RIGHT
Large size is here http://farm2.static.flickr.com/1145/587304828_c2d64e02c0_o.jpg
Ok, Now theres more to do.
See the little cicle button (in above pic) in the top right corned , just to the left of the "ctags" combo box?
CLICK IT! it wil take you here!
Folow the arrows and apply the necisary modifications.
and these modifications

Btw, that text that you MUST have is " –langmap=pascal:+.scar "
ps, it took me fovered to find that out, so you owe me
Good. Now you should have that all set up to go
Congrats
Here some more stuff to do, to make scar open from jedit when its testing time
Go to plugin options>helper launcher

I didn't have to set the glob stuff, because mine already opened scar on windows double click, if yours does not, you will have to do more than the check mark, and actually define the glob (i gave it to you) and the path the the scar executable
Now all we need to do is make it a button.
Do this by going to global options > toolbar > add
Note, it will be under the plugins section, (you are looking for "helper launcher")

You can give it an icon too if you like.
Ok, good, now all we have left to do is folding.
Make sure that you set up Global options->editing->pascal to use CUSTOM folding., else this wont work
Go to plugin options>configurable folding, and set it up like i did.

Yeah, tell it to use regex
here is my one for start
(?<!Start )\b(BEGIN|Begin|begin|REPEAT|repeat|program|Program|PROGRAM)\b
and my one for stop
(?<!End )\b(END|end|End|Until|until|UNTIL)\b
Ok, the rest is up to you, let me know of any improvements I can make, and happy scar scripting!
This is NOT a tut about jEdit, there are PLENTY of those, like this one http://www.jedit.org/index.php?page=quickstart
Here we go, this tut will teach you how to set up jedit to work and navigate scar files. Because scar is an extension of an old language (pascal) it's slightly more tricky than you would expect.
Why do you want to do this? Here is why.(picture below for visual)
Jedit is a fancy little editor that will color code your text for you, and highlight key words and stuff. It can also give you a handy organization bar to easily see your functions and navigate to them, as well as allowing begins-ends to be collapsed down to help you look at your code better.
bigger immage is here http://farm2.static.flickr.com/1242/586915781_a414a8e956_o.jpgBeautiful isnt it? The only think it doesnt do is the context sensitive help like scar does, but it tries lol.
Ok, first, you need to have java installed. You will need at least the java runtime http://java.sun.com/j2se/1.5/
Thats not even hard, if you can't get it to work, google it.
Second, you need to get Jedit.
It's right here http://www.jedit.org/ and the download link is here
http://www.jedit.org/index.php?page=download
I installed mine to "C:/program files/jedit/"
so keep that in mind for reference
Ok, good, simple enough.
Now here is where the fun comes in. We need to get some plugins, and to do that, we need to get the plugin mirror to work.
Go to General Options –> Plugin Manager –> Update Miror List
Like this.

Ok, now we can start downloading some plugins.
Here is a note about them, read what they do before you download them. I erased all my scar files because I rushed through this part.
Here I have listed the plugins that are a must. They have a red arrow next to them.



Good, now , shut down jedit NOW.
I know you want to play around with the plugins, but just listen to me and do it. SHUT it down, and then RESTART IT
Good, now, lets get some stuff to start working.
First off, lets make sure that jedit recognizes scar files
Set up this page like I have! Folow the arrows!
To get here go to general options>editing>pascal

Make sure that you
unchecked to use default settings,
checked soft tabs
added ",scar" to the file name glob
Oh, and CHANGE FOLDING MODE TO CUSTOM
Ok, good, now lets set up ctabs sidekick
GO to plugin options>ctags sidekick

Yep, you need to go to http://ctags.sourceforge.net and download the ZIP file of the latest realease.
Unzip that file to your jedit folder, (mine was C:\program files\jedit\ctags56")
Add whatever path that is to the .exe file you downloaded as shown above!
Good…
Now! Lets open up side kick. You do this folowing the chain I did. After it is open, RIGHT CLICK, and choose DOCK TO RIGHT
Large size is here http://farm2.static.flickr.com/1145/587304828_c2d64e02c0_o.jpgOk, Now theres more to do.
See the little cicle button (in above pic) in the top right corned , just to the left of the "ctags" combo box?
CLICK IT! it wil take you here!
Folow the arrows and apply the necisary modifications.
and these modifications
Btw, that text that you MUST have is " –langmap=pascal:+.scar "
ps, it took me fovered to find that out, so you owe me
Good. Now you should have that all set up to go
Congrats
Here some more stuff to do, to make scar open from jedit when its testing time
Go to plugin options>helper launcher

I didn't have to set the glob stuff, because mine already opened scar on windows double click, if yours does not, you will have to do more than the check mark, and actually define the glob (i gave it to you) and the path the the scar executable
Now all we need to do is make it a button.
Do this by going to global options > toolbar > add
Note, it will be under the plugins section, (you are looking for "helper launcher")

You can give it an icon too if you like.
Ok, good, now all we have left to do is folding.
Make sure that you set up Global options->editing->pascal to use CUSTOM folding., else this wont work
Go to plugin options>configurable folding, and set it up like i did.

Yeah, tell it to use regex
here is my one for start
(?<!Start )\b(BEGIN|Begin|begin|REPEAT|repeat|program|Program|PROGRAM)\b
and my one for stop
(?<!End )\b(END|end|End|Until|until|UNTIL)\b
Ok, the rest is up to you, let me know of any improvements I can make, and happy scar scripting!