Cobra mode for SciTE
Posted: Mon Feb 11, 2008 2:08 pm
Hi,
I've adapted the Python Properties file for SciTE to Cobra. It does syntax highlighting, folding, and hitting F5 runs the script.
Since I didn't manage to attach the file (all extensions were rejected), I paste it below.
# Define SciTE settings for Cobra files.
# Adapted from Python mode
file.patterns.cobra=*.cobra
filter.cobra=cobra (cobra)|$(file.patterns.cobra)|
lexer.$(file.patterns.cobra)=python
keywordclass.cobra=all and any as assert \
base be body bool branch break \
callable catch char class continue cue \
decimal def down dynamic \
else end ensure enum event every except expect extend \
false finally float for from get global has \
if ignore implements implies import in inherits inlined inout instance int interface invariant is \
listen must namespace nil not number \
objc of off old on or out override \
pass passthrough post print pro \
raise ref require return same set shared step stop struct success \
test this throw to to? trace true try \
use using var vari virtual where where while yield \
keywords.$(file.patterns.cobra)=$(keywordclass.cobra)
statement.indent.$(file.patterns.cobra)=10 :
statement.end.$(file.patterns.cobra)=
statement.lookback.$(file.patterns.cobra)=0
block.start.$(file.patterns.cobra)=
block.end.$(file.patterns.cobra)=
tab.timmy.whinge.level=1
#fold.quotes.cobra=1
comment.block.cobra=#~
# cobra styles
# White space
style.cobra.0=fore:#808080
# Comment
style.cobra.1=fore:#007F00,$(font.comment)
# Number
style.cobra.2=fore:#007F7F
# String
style.cobra.3=fore:#7F007F,$(font.monospace)
# Single quoted string
style.cobra.4=fore:#7F007F,$(font.monospace)
# Keyword
style.cobra.5=fore:#00007F,bold
# Triple quotes
style.cobra.6=fore:#7F0000
# Triple double quotes
style.cobra.7=fore:#7F0000
# Class name definition
style.cobra.8=fore:#0000FF,bold
# Function or method name definition
style.cobra.9=fore:#007F7F,bold
# Operators
style.cobra.10=bold
# Identifiers
style.cobra.11=
# Comment-blocks
style.cobra.12=fore:#7F7F7F
# End of line where string is not closed
style.cobra.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Highlighted identifiers
style.cobra.14=fore:#407090
# Decorators
style.cobra.15=fore:#805000
# Matched Operators
style.cobra.34=fore:#0000FF,bold
style.cobra.35=fore:#FF0000,bold
# Braces are only matched in operator style
braces.cobra.style=10
if PLAT_WIN
cobra=C:\Code\Cobra\bin\cobra.exe
command.go.*.cobra=$(cobra) "$(FileNameExt)"
command.compile.*=$(cobra) -c "$(FileNameExt)"
if PLAT_GTK
cobra=cobra
command.go.*.cobra=$(cobra) "$(FileNameExt)"
command.compile.*=$(cobra) -c "$(FileNameExt)"
I've adapted the Python Properties file for SciTE to Cobra. It does syntax highlighting, folding, and hitting F5 runs the script.
Since I didn't manage to attach the file (all extensions were rejected), I paste it below.
# Define SciTE settings for Cobra files.
# Adapted from Python mode
file.patterns.cobra=*.cobra
filter.cobra=cobra (cobra)|$(file.patterns.cobra)|
lexer.$(file.patterns.cobra)=python
keywordclass.cobra=all and any as assert \
base be body bool branch break \
callable catch char class continue cue \
decimal def down dynamic \
else end ensure enum event every except expect extend \
false finally float for from get global has \
if ignore implements implies import in inherits inlined inout instance int interface invariant is \
listen must namespace nil not number \
objc of off old on or out override \
pass passthrough post print pro \
raise ref require return same set shared step stop struct success \
test this throw to to? trace true try \
use using var vari virtual where where while yield \
keywords.$(file.patterns.cobra)=$(keywordclass.cobra)
statement.indent.$(file.patterns.cobra)=10 :
statement.end.$(file.patterns.cobra)=
statement.lookback.$(file.patterns.cobra)=0
block.start.$(file.patterns.cobra)=
block.end.$(file.patterns.cobra)=
tab.timmy.whinge.level=1
#fold.quotes.cobra=1
comment.block.cobra=#~
# cobra styles
# White space
style.cobra.0=fore:#808080
# Comment
style.cobra.1=fore:#007F00,$(font.comment)
# Number
style.cobra.2=fore:#007F7F
# String
style.cobra.3=fore:#7F007F,$(font.monospace)
# Single quoted string
style.cobra.4=fore:#7F007F,$(font.monospace)
# Keyword
style.cobra.5=fore:#00007F,bold
# Triple quotes
style.cobra.6=fore:#7F0000
# Triple double quotes
style.cobra.7=fore:#7F0000
# Class name definition
style.cobra.8=fore:#0000FF,bold
# Function or method name definition
style.cobra.9=fore:#007F7F,bold
# Operators
style.cobra.10=bold
# Identifiers
style.cobra.11=
# Comment-blocks
style.cobra.12=fore:#7F7F7F
# End of line where string is not closed
style.cobra.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Highlighted identifiers
style.cobra.14=fore:#407090
# Decorators
style.cobra.15=fore:#805000
# Matched Operators
style.cobra.34=fore:#0000FF,bold
style.cobra.35=fore:#FF0000,bold
# Braces are only matched in operator style
braces.cobra.style=10
if PLAT_WIN
cobra=C:\Code\Cobra\bin\cobra.exe
command.go.*.cobra=$(cobra) "$(FileNameExt)"
command.compile.*=$(cobra) -c "$(FileNameExt)"
if PLAT_GTK
cobra=cobra
command.go.*.cobra=$(cobra) "$(FileNameExt)"
command.compile.*=$(cobra) -c "$(FileNameExt)"