Hy Community,
ich mache gerade einen Seitensprung in FreeBasic und versuche schon seit einer Ewigkeit SciTE4AutoIt3 dazu zu bringen das auch FB-Code in einem ähnlichen Style wie Au3 erstrahlt.
Habe schon zig mal die 'freebasic.properties' geändert oder angepasst - immer ohne Erfolg... Habe mich auch durch die (leider englische) SciTE Hilfedatei gelesen und dort einige Punkte erhascht worin beschrieben wird wie der Lexer umgebaut werden kann. Nur liegt nicht der Source des Lexer´s vor und eine neuere Version dessen bringt SciTE direkt zum Absturz.
Ich las auch was davon das ich ein LUA-Skript verwenden könnte, nur wo finde ich eine Vorlage und wo binde ich diese ein?
Habt ihr schon Versuche mit dem SciTE-Lexer unternommen? Oder könnt ihr mir (verständliche) Info´s über dieses Thema zukommen lassen
Um es auf dem Punkt zu bringen, es werden mir Farben angezeigt welche ich garnicht deklariert habe und auch das Folding stimmt gar nicht. Da ich nicht in Erfahrung bringen kann wie ich die Keywords zuordnen muss, kann ich diese nicht entsprechend einfärben... Und das Folding von Kommentar-Blöcken soll in FB mit dem Lexer nicht möglich sein, entweder baue ich diesen um oder vielleicht kann ich auch dem Lexer erzählen das er eine Sprache vor sich hat?!
freebasic.properties
# Freebasic4SciTE settings.
#
# 2015 - Techmix
#
#
# Filepattern: fb
# Lexer: freebasic
## Pathes&Files
#~ freebasic.exe=C:\Coding\FreeBASIC\fbc.exe
#~ freebasic.helpfile=
win32.help=
win.styles.help=C:\Coding\FreeBASIC\freebasicEdit\Help\Windows_styles.chm
au3.exe=C:\Coding\AutoIt3\autoit3.exe
## Patterns
#~ freebasic=*.bas;*.bi
#~ filter.freebasic=FreeBasic (bas bi)|$(freebasic)|
#~ lexer.$(freebasic)=au3
fb=*.bas;*.bi
filter.fb=FreeBasic (bas bi)|$(fb)|
lexer.$(fb)=freebasic
## Autocomplete and call tip settings
api.$(fb)=$(SciteDefaultHome)\api\freebasic.api
proper.case=0
calltip.freebasic.word.characters=$(chars.alpha)$(chars.numeric)_
calltip.freebasic.ignorecase=1
calltip.freebasic.end.definition=)
calltip.freebasic.parameters.separators=,
autocomplete.freebasic.ignorecase=1
autocomplete.freebasic.start.characters=$(chars.alpha)$(chars.numeric)$_@#*
word.characters.$(fb)=$(chars.alpha)$(chars.numeric)$(chars.accented).$_@#*
statement.indent.$(fb)=1 if else do while
statement.end.$(fb)=5 endif until loop
statement.lookback.$(fb)=
block.start.$(fb)=5 \
asm if else elseif for case select switch do while with function sub \
Asm If Else ElseIf For Case Select Switch Do While With Function Sub \
ASM IF ELSE ELSEIF FOR CASE SELECT SWITCH DO WHILE WITH FUNCTION SUB
block.end.$(fb)=5 \
endif next until loop wend end \
EndIf Next Until Loop Wend End \
ENDIF NEXT UNTIL LOOP WEND END Declare
## Comments functions definition
comment.block.freebasic='~
comment.block.at.line.start.freebasic=1
comment.stream.start.freebasic=/'
comment.stream.end.freebasic='/
comment.box.start.freebasic=/'
comment.box.middle.freebasic=
comment.box.end.freebasic='/
## Import the seperate freebasic.keywords.properties file
import properties\freebasic.keywords
import properties\asm.keywords
# Inline-ASM
keywords6.$(fb)=$(asm)
# keywords&datatypes
keywords.$(fb)=$(keywords) $(datatypes)
# Functions
keywords2.$(fb)=$(functions)
# Api-Functions
keywords3.$(fb)=$(apifunctions)
# Ext-Functions
keywords4.$(fb)=$(extfunctions)
# Pre-Processor
keywords5.$(fb)=$(preprocessor)
## FreeBasic Syntax-Colors:
Col_Backround= #F0F4F9
Col_CarretLine= #FFFED8
Col_SelectedTextF= #006000
Col_SelectedTextB= #F0A0A8
Col_WhiteSpace= #000000
Col_CommentLine= #008000,italics
#~ Col_Number= #0000FF,bold,italics
Col_Number= #AC00A9,bold,italics
Col_Function= #000090,bold,italics
Col_Keyword= #0000FF,bold
Col_Macro= #808000,bold
Col_String= #FF0000,bold
Col_Operator= #FF8000,bold
Col_Variable= #5A5A5A,bold
Col_SendKeys= #808080,bold
Col_PreProcessor= #808000,italics
Col_Special= #DC143C,italics
Col_AbbrevExpand= #FF0000,bold
Col_COMObjects= #993399,bold,italics
Col_UDFs= #0080FF,bold,italics
Col_Test= #00FF00,bold,italics
## FreeBasic extendet style
# Background
style.freebasic.32=style.*.32=back:$(Col_Backround)
# CaretLine Background
caret.line.back=$(Col_CarretLine)
# White space
style.freebasic.0=fore:$(Col_WhiteSpace)
# Comment
style.freebasic.1=fore:$(Col_CommentLine)
# Number
style.freebasic.2=fore:$(Col_Number)
# Keyword1 - Keywords&Datatypes
style.freebasic.3=fore:$(Col_Keyword)
# String
style.freebasic.4=fore:$(Col_String)
# FreeBasic Pre-Processor
style.freebasic.5=fore:$(Col_PreProcessor)
# Operator
style.freebasic.6=fore:$(Col_Operator)
# Identifier
style.freebasic.7=$(style.freebasic.0)
# Date
# style.freebasic.8=$(colour.error)
# StringEOL
# style.freebasic.9=$(colour.error)
# Keyword2: seems to be for Freebasic preprocessors - Base Functions
style.freebasic.10=fore:$(Col_Function)
# Keyword3 - Api Functions
style.freebasic.11=fore:$(Col_COMObjects)
# Keyword4 - Ext Functions
style.freebasic.12=fore:$(Col_UDFs)
# Constant
# style.freebasic.13=$(colour.error)
# FreeBasic Inline-ASM
style.freebasic.14=fore:$(Col_Special)
# Label
style.freebasic.15=$(colour.preproc)
# Error
style.freebasic.16=$(colour.error)
# HexNumber
style.freebasic.17=fore:$(Col_Number)
# BinNumber
style.freebasic.18=fore:$(Col_Number)
# Line numbers
#~ style.freebasic.33=fore:$(WHITE),back:$(GREY)
# Brace highlight
style.freebasic.34=fore:$(Col_Keyword),back:$(Col_Backround)
# Brace incomplete highlight
style.freebasic.35=fore:#009933,back:$(Col_Backround)
## freebasic Commands
# 1 Ausführen einer kompilierten Datei
command.name.1.$(fb)=Run
command.1.$(fb)="$(fb.exe)" -s gui "$(FileNameExt)"
command.save.before.1.$(fb)=1
command.shortcut.1.$(fb)=F5
# 2 Kompiliere Anwendung
command.name.2.$(fb)=Compile Gui
command.2.$(fb)="$(fb.exe)" -s gui "$(FileNameExt)"
command.save.before.2.$(fb)=1
command.shortcut.2.$(fb)=Shift+F5
# 3 Kompiliere Konsolenanwendung
command.name.3.$(fb)=Compile Console
command.3.$(fb)="$(fb.exe)" -s console "$(FileNameExt)"
command.save.before.3.$(fb)=1
command.shortcut.3.$(fb)=Ctrl+F5
# 4 Kompiliere Dll
command.name.4.$(fb)=Compile Dll
command.4.$(fb)="$(fb.exe)" -s gui -dll -export "$(FileNameExt)"
command.save.before.4.$(fb)=1
command.shortcut.4.$(fb)=F7
# 5 Kompiliere Dll SSE
command.name.5.$(fb)=Compile SSE-Dll
command.5.$(fb)="$(fb.exe)" -s gui -dll -export -fpmode FAST -fpu SSE "$(FileNameExt)"
command.save.before.5.$(fb)=1
command.shortcut.5.$(fb)=Shift+F7
# 6 Konvertiere zu ASM
command.name.6.$(fb)=Covert to ASM
command.6.$(fb)="$(fb.exe)" -s gui -dll -export -R "$(FileNameExt)"
command.save.before.6.$(fb)=1
command.shortcut.6.$(fb)=Shift+F9
# 7 Hilfe fb
command.name.7.$(fb)=Hilfe
command.7.$(fb)="$(au3.exe)" "$(SciteDefaultHome)\api\fbExecute.au3" "$(fb.helpfile)_Help" $(CurrentWord)
command.save.before.7.$(fb)=0
command.subsystem.7.$(fb)=2
command.shortcut.7.$(fb)=F1
# 8 Hilfe Win32
command.name.8.$(fb)=Hilfe Win32
command.8.$(fb)="$(win32.help)"
command.save.before.8.$(fb)=0
command.subsystem.8.$(fb)=2
command.shortcut.8.$(fb)=Shift+F1
# 9 Hilfe Win Styles
command.name.9.$(fb)=Hilfe Win Styles
command.9.$(fb)="$(win.styles.help)"
command.save.before.9.$(fb)=0
command.subsystem.9.$(fb)=2
command.shortcut.9.$(fb)=Ctrl+F1
Alles anzeigen
Da ich die Keywords nicht Posten kann (mein Firefox hängt sich immer auf) habe ich beide Dateien noch gezippt.
Grüsse!