Page 1 of 2
SciTE editing color syntax
Posted: Wed Aug 11, 2004 1:28 pm
by Linux Lunatyk
Editing PB code with syntax highlighted. It is actually based on the original SciTE and some other user's contribution and modified to work in my SuSE system. I should say that it isn't cleaned and I'm not real knowledgeable regarding SciTE configuration files although it is my favorite editor.
{ My apologies for the original (long) post. I thought this would be a simple, read only post. It wound up being a PITA. Please use the url's provided to access the ScITE files.
http://www.dcnet2000.com/~quazar/pub/pb ... properties
http://www.dcnet2000.com/~quazar/pub/pb ... properties
Cheers,
Mike T.
Posted: Sun Aug 15, 2004 5:28 am
by Beach
I had no trouble getting this to work on Mandrake 10 using version 1.58 of SciTE. Thank you!
Posted: Sun Aug 22, 2004 10:31 pm
by Beach
If you want to compile your app in SciTE using the F5 key, change the following line:
if PLAT_GTK
command.go.*.pb="pbcompiler $(FilePath)"
to
if PLAT_GTK
command.go.*.pb=pbcomplier "$(FilePath)"
This will create a file called "purebasic.exe" in the directory where your script is located. I created a bash script that can be used with SciTE to change the file produced to be the name of the script with the extention of ".pbe". It will also execute the file so it will behave as it does when using 'pbcomplier'
file name I used 'buildpb.sh'
Code: Select all
#!/bin/sh
cmdstring=${1}
cmdlen=${#cmdstring}
ext=${cmdstring:cmdlen-3:3}
if [ ${ext} == ".pb" ]; then
outfile=${cmdstring:0:cmdlen-2}"pbe"
fi
echo ${outfile}
pbcompiler ${1} -e ${outfile}
${outfile}
Create the file in your /usr/bin directory then change SciTE's pb.properties file as suggested above:
if PLAT_GTK
command.go.*.pb=buildpb.sh "$(FilePath)"
-Beach
Posted: Sun Aug 22, 2004 11:09 pm
by Linux Lunatyk
Now all we need is someone to write a real 'lexer' so stuff like folding, et.al works. It requires some C++ coding and I don't use that language.
Any takers? Please!
Posted: Sun Aug 22, 2004 11:56 pm
by GedB
GPI appears to have already written such a lexer for jaPBe, and in PB too. Perhaps you could lift that.
I understand that jaPBe itself is window's only, but that particular code could probably be made cross-platform easily enough.
Download the source and look at editor-core.pbi.
Posted: Tue Aug 24, 2004 11:52 am
by Linux Lunatyk
I'll give it a try but I think the lexer for ScITE is somewhat different than one for an editor running in Windows.
Cheers,
Mike T.
Posted: Tue Aug 24, 2004 12:09 pm
by GedB
Linux Lunatyk,
jaPBe uses Scintilla, the same as scite.
It should all be cross platform.
Posted: Tue Aug 24, 2004 1:52 pm
by Linux Lunatyk
GedB wrote:jaPBe uses Scintilla, the same as scite.
It should all be cross platform.
Would be it were that easy.
Ok, I installed JaPBE in a Windows/VmWare with the source. What I see so far is a SciLexer.dll in the exe's directory but I cannot locate the actual source code for this. I have found code which utilizes the lexer but not the lexer code itself. Even with the code, it might not be easy to port to Linux based on what little I know of Scintilla or C/C++ for that matter.
If you can figure this out and/or get the code it might help. At this point I don't need the extra features myself. It's just a matter of completeness.
Cheers,
Mike T.
color syntax & folding
Posted: Tue Aug 24, 2004 5:38 pm
by Linux Lunatyk
FWIW, there is a complete syntax/fold file for the KDE Kate editor at the kate site. Use menu, Configure Kate select the Highlighting item in the tree list then click the download.
Ok, perhaps it's not complete as it was for 3.8 but still, it's very useful for those who don't mind KDE.
Cheers,
Mike T.
Posted: Tue Aug 24, 2004 5:57 pm
by Beach
Kate sounds good. I would like to see SciTE do it though, I do not have KDE on some of my machines. The required space for SciTE is lighter as well when you consider Kate will need the KDE base files to run (at least that is what I assume). I think I will give the mailing list a try at the Scintilla site. I'll report back if I find anything.
Posted: Fri Aug 27, 2004 10:03 pm
by Linux Lunatyk
Beach wrote:Kate sounds good. I would like to see SciTE do it though, I do not have KDE on some of my machines. The required space for SciTE is lighter as well when you consider Kate will need the KDE base files to run (at least that is what I assume). I think I will give the mailing list a try at the Scintilla site. I'll report back if I find anything.
Yes, Kate/KDE uses a lot of resources but has some interesting possibilities. You have access to browsing files, a terminal for building your prog's (or other things) and multiple open files. In my case, I added 2 small scripts (in ~/bin) to ease the typing of long file names. These can also be used in any terminal. I sometimes use them in Midnight Commander.
Code: Select all
#run filename (no extension) = build and execute the program (filename).
pbcompiler $1.pb -e $1
./$1
Code: Select all
#pbc filename (no extension) = compile the code file (filename)
pbcompiler $1.pb -e $1
Cheers,
Mike T.
another scintilla based editor.
Posted: Mon Sep 13, 2004 8:21 am
by Linux Lunatyk
I've not spent much time with this but it looks promising. It has built in python scripting for more advanced options. It doesn't handle the color for PureBasic yet and any help here would be appreciated. You can find it by the provided link or simply 'google' for 'cute scintilla editor'
http://www.icewalkers.com/Linux/Softwar ... /CUTE.html
Hope this helps someone. Perhaps we can make it a useable PB editor.
Cheers,
Mike T.
Posted: Mon Sep 13, 2004 10:16 pm
by The_Pharao
how can i help?
i would love to have a proper editor for PB in linux!
Posted: Mon Sep 20, 2004 6:41 pm
by The_Pharao
ok, i asked GPI if he wrote a lexer for scintilla that could be used for scite, too. he answered, that he wrote his own routines for japbe because he did not understand how the scite/scintilla lexer thing works.
so... how can we get an editor to work for linux, then?
Linux PB editor
Posted: Sat Oct 02, 2004 12:43 am
by Linux Lunatyk
Sorry, been offline for a little while, health problems.
I haven't had much time to really look into this. The necessary info should be on the Scintilla/Scite website. It will require some reading (IME). You may need info from the PureBasic doc's or perhaps the Kate editor/PureBasic file. Sadly, I can't spend much time on this right now. Temporarily stuck in a Wndows world
Cheers,
Mike T.