djmarcus wrote:I'm very new to cobra (started today). What I see is inspiring.
Today is also my first day of using Cobra and I'm very enthusiastic about what I've found, I think big thanks and congratulations are due to Chuck.
I hadn't seen the page that linked to the other IDEs so I actually spent the morning figuring out how to enable highlighting in PSPad, which is my favourite text editor. I have it so it now does syntax highlighting, calls the compiler, displays the compilers output in a separate pane and also displays a class browser. That's plenty good enough for me for now.
This is what I did just in case anyone else is interested:
First use PSPad to open a new *.ini file, then copy and paste the following text and save it as 'Cobra.ini' in the 'Syntax' sub directory of your PSPad install directory:
- Code: Select all
;PSPad user HighLighter definition file
[Settings]
Name=Cobra
HTMLGroup=0
Label=1
FileType=*.cobra
CommentString=
SharpComment=1
Preprocessors=1
IndentChar=
UnIndentChar=
TabWidth=4
CaseSensitive=1
SingleQuote=1
DoubleQuote=1
KeyWordChars=_
CodeExplorer=ftPy
[KeyWords]
adds=
all=
and=
any=
as=
assert=
body=
branch=
break=
callable=
catch=
class=
const=
continue=
cue=
def=
do=
dynamiceach=
else=
end=
ensure=
enum=
event=
every=
except=
extend=
finally=
for=
from=
get=
has=
if=
ignore=
implements=
implies=
in=
inherits=
inlined=
inout=
interface=
invariant=
is=
listen=
lock=
mixin=
must=
namespace=
not=
objc=
of=
old=
on=
or=
out=
pass=
passthrough=
post=
print=
pro=
raise=
ref=
require=
return=
same=
set=
sig=
stop=
struct=
success=
test=
throw=
to=
trace=
try=
using=
var=
vari=
where=
while=
yield=
[ReservedWords]
Array=
char=
Color=
decimal=
dynamic=
DateTime=
Dictionary=
Exception=
float=
float32=
float64=
int=
int8=
int16=
int32=
int64=
ICloneable=
IComparable=
IDictionary=
IEnumerable=
IList=
List=
number=
Object=
Queue=
Set=
Stack=
StreamReader=
StreamWriter=
String=
StringBuilder=
StringReader=
StringWriter=
TextReader=
TextWriter=
uint=
uint8=
uint16=
uint32=
uint64=
[KeyWords2]
true=
false=
nil=
use=
import=
base=
this=
[KeyWords3]
abstract=
fake=
internal=
new=
nonvirtual=
override=
partial=
private=
protected=
public=
shared=
virtual=
n.b. Today is my first day with Cobra, I think I have the correct words but another pair of eyes would be useful.
From the 'Settings' menu select 'Highlighters Settings'
On the 'Specification' tab select one of the <not assigned> items in the left hand panel and then select 'Cobra' from the 'User Highlighters' list in the neighbouring panel. <not assigned> will then be replaced with 'Cobra', make sure the attached check box is ticked.
On the 'Compilers' tab set the compiler path to wherever you have installed Cobra.exe, set the parameters field to %File% (any other switches should bet set with @args in the *.cobra file itself).
Check these three check boxes on the bottom of the 'Compiler' tab:
'Save All Files Before Compilation'
'Capture Program Output Window'
'Hide Output Window'
On the 'Colors' tab you can select a font and colour you like for each of the headings defined in the text above.
To display the class browser select 'Code Explorer Window' from the tools window, if it opens as a separate window you can drag and drop it on to the tool panel on the left hand side and then it will just become an additional tab. If it is not displaying the classes in your current file right click in its window and select 'Refresh' from the context menu.
Now when you want to compile select 'Compile' from the 'File' menu, a new pane will open (if it's not there already) at the bottom of the editor that displays the compilers messages.
Although PSPad is a Windows app I know it also runs fine with Wine on Linux Mint as I have it on one of my laptops, although I haven't (yet) tried getting that to call Cobra.