jEdit support and ConTEXT highlighters

BlitzMax Forums/BlitzMax Programming/jEdit support and ConTEXT highlighters

N(Posted 2005) [#1]
I've written a jEdit mode and commando (you'll need the Console plugin for that) for BlitzMax, and a ConTEXT highlighter for it as well.

You can grab the mode and commando from these links:
http://community.jedit.org/?q=node/view/2019
http://community.jedit.org/?q=node/view/2022
<EDIT>
makemods commando: http://community.jedit.org/?q=node/view/2024
syncmods commando: http://community.jedit.org/?q=node/view/2025

No how-tos on installing these as it should be evident how to do it from the ones I already posted.
</EDIT>

And the ConTEXT highlighter can be downloaded from here.

The websites for these two IDEs:
www.jedit.org
www.context.cx


N(Posted 2005) [#2]
OK, adding how-to's on all three files.

To install the edit mode:

I should note that there's nothing you need to download besides blitzmax.xml in order to use the edit mode.

First of all, place blitzmax.xml into your_jEdit_folder/modes/. Then open up the catalog file (should be your_jEdit_folder/modes/catalog) and add this line:
<MODE FILE="blitzmax.xml" NAME="blitzmax" FILE_NAME_GLOB="*.bmx"/>


That's all there is to installing an edit mode.


To install the BMK Commando:

You have to have the Console plugin in order to use this. To download that, go into the Plugin Manager, click the Install tab, and then- obviously- tick 'Console' and click Install.

First of all, go to your home directory; on Linux, it's as simple as going to '~\' in whatever you're using, on Windows you have to know where to go. I don't know where the home directory is located on WinME and under, but on Win2K and winXP it's located under 'C:\Documents and Settings\YOUR USERNAME\'. In any case, I'm going to refer to the home directory as ~\ in this bit.

When you're in your home directory, there should be a '.jedit' folder- it's usually hidden, so just enter it in the address bar if you don't want to show all hidden files (who doesn't?). Afterwords, go into the 'console' folder, then inside that go into the 'commando' directory. You place bmk.xml in there.

Now that the only slightly annoying part is done with, you have to do one thing (two if you didn't shut down jEdit before putting bmk.xml in the commandos directory- just restart it if you didn't). Go into the Plugins menu and click Plugin Options. Select Console->Compile & Run. Find the blitzmax entry and set its compiler to bmk. Done.


To use the ConTEXT highlighter:

Only one thing you have to do: put the highlighter in your_ConTEXT_folder/highlighters/.


xlsior(Posted 2005) [#3]
but on Win2K and winXP it's located under 'C:\Documents and Settings\YOUR USERNAME\



...Not always.

For one thing, it's a different folder in the dozens of non-English translated versions of windows.

You really, REALLY should check the environment variables to find out the user's home directory, and never simply assume anything.


Perturbatio(Posted 2005) [#4]
For one thing, it's a different folder in the dozens of non-English translated versions of windows.

Yes, but he's only talking about the important people. ;)


N(Posted 2005) [#5]
You really, REALLY should check the environment variables to find out the user's home directory, and never simply assume anything.


Why? If someone can't find their home directory they probably shouldn't be using a computer in the first place.


N(Posted 2005) [#6]
For those of you who don't feel like downloading the IDEs just to try them out, here is a side-by-side screenshot of the two. The color schemes in both are customizeable.




N3m(Posted 2005) [#7]
Looks good, but when i click on the link i always get

You are not authorized to access this page.

I tried to register but i got no email :/


AntonyWells(Posted 2005) [#8]
Same here on the JEDIt one. Looks nice too... No direct links?


N(Posted 2005) [#9]
Links fixed.

N3m: Takes a while, trust me. If you get impatient, you can always do the 'forgot password' thing and it'll send you a new one that works just fine.


regaa(Posted 2005) [#10]
If i add blitzmax to the catalog file, i cant start jedit anymore. Remove this entry again, i get it started, why?
Syntax seems to be right. All files i should download, i 've downloaded and put them in the right direcoty and install all other stuff that's needed by jedit.


N(Posted 2005) [#11]
regaa: My only thought is that you may be using an older version of jEdit, but it just plain not starting shouldn't happen.


regaa(Posted 2005) [#12]
I found my mistake, it was a really stupid mistake. I 've put the wrong blitzmax.xml in the directory, due to rename some files :(. Sorry.


regaa(Posted 2005) [#13]
Is it possible to colorize the background of Types a bit other than the rest? Or change the triangles as folding-icons into something useful like it is in protean ? :)


N(Posted 2005) [#14]
I don't know, you'll have to look at the syntax highlighting options in jEdit, as the edit mode has nothing to do with the color choices.


regaa(Posted 2005) [#15]
done, but nothing similar to visual blitz's background colouring , or proteans folde lines found (to see where the folding area ends) :(.

EDIT: On the right picture i can see some brackets below the folding triangle, above end function. How to set them up?


N(Posted 2005) [#16]
Go into to the Global Options window and change the folding mode to 'indent'. This is mostly dependent on coding style, so you're gonna either have to set up some scheme to fold them properly, or indent code for ever fold- or use explicit folds.


Booticus(Posted 2005) [#17]
Oh a note to anyone else who is a bonehead like me:

To actually compile after everything is setup, when you run the bmk commando and its asking for "output", throw your app name in there i.e. "myprogram.exe". I had a hard time with that one. I musta taken stupid pills for a week! ;)


Takuan(Posted 2005) [#18]
If you click on download and you get an error message regarding XML files and stylesheet, right click on "download" and save the xml document.

Took me 10 Minutes to figure that out, looks like i have got some of your pills too:-P


Takuan(Posted 2005) [#19]
How i can get it to compile current Buffer?

BMK Path:D:\BlitzMax\bin\bmk.exe
Compile Mode: Both
Output: Test.exe

Test.exe was a little programm i compiled via BMax IDE.
Now, if i try to compile in Jedit i get in the console:
blabla> $d\test.exe

The test.exe starts, but any changes in test.bmx have no effect.Its like JEdit only starts Test.exe but doesnt compile test.bmx before.


Booticus(Posted 2005) [#20]
Now....anyone get it to work on OS X?


Takuan(Posted 2005) [#21]
Booticus what version of JEdit did you use?

Here it looks like Blitzmax.xml doesnt use the right commands.
Console shows me then:
D:\BMAXBETA\jEdit> $d\test.exe
which just starts the .exe without compiling .bmx first.

If i type in console:
E: D:\BMAXBETA\BlitzMax\bin\bmk.exe makeapp -a -r -o makeap_release test.bmx
everything compiles fine.

How is it possible to start BMK or an .Exe from within BMax?

Then i could write my own "compileandstart.exe" and paste it to Desktop.
Not perfect, but better then use plain console in JEdit.


Chris C(Posted 2005) [#22]
or you could make a batch file .bat

or even a Makefile :O

I gave up on jedit, after I realised that i'd have to
chop up the buffers name (has file and path) and it
was late...

if anyone knows java its a method of the buffer object
dont get confused with the buff file name in cowers
attempt, buffer.getname or somthing like that its one
of the objects jedit exposes...

context isnt too bad got error parsing to work, shame it
doesnt do function index and code rollups


Booticus(Posted 2005) [#23]
Im using the 4.2 final. The "Commando" tools that Noel put at the top for download are thrown in the Commando directory. READ HIS INSTRUCTIONS CAREFULLY! I totally lamed out and put the wrong dang files in the wrong directory a coupla times. These commandos are just scripts to run the bmk.exe and pass it the file names and parameters (like -r, -d, -a..etc.) so it will run the whole thing for you. But for me at least, it doesnt work at all unless I have an already compiled .exe of my program in the directory I'm compiling from....did that make sense? And Im not the sharpest tool in the shed, so I could be doing something else wrong. I DID mention stupid pills before, remember?? ;)


Booticus(Posted 2005) [#24]
Oops! The above post was to @Takuan. Sorry! :)


Chris C(Posted 2005) [#25]
managed to get some sleep for a change, woke up, slapped forehead....

if you dont save b4 compiling theres a file locking
issue sometimes

occasionally bmk will seg fault...

2 commandos 1 to compile, 1 to run

Thanks to Cower of the origanal commando!

Bmk.xml


BlitzRun.xml



Booticus(Posted 2005) [#26]
Thanks! Workin great!


Chris C(Posted 2005) [#27]
great, glad it helps someone, and *thanks* for the feedback



anyone any thoughts on the (possibly file locking problem)?