Results 1 to 9 of 9

Thread: How to enable syntax highlighting for my new commands?

  1. #1

    How to enable syntax highlighting for my new commands?

    i got my first TB Modul working all works fine
    but inside thinAir the new commands and const's are not highlighted in blue
    what i'm doing wrong ?

    Joshy
    (Sorry about my bad English.)

  2. #2
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: How to enable syntax highlighting for my new commands?

    Locate the syntax folder in your TB install folder i.e. "C:\thinBasic\thinAir\Syntax"

    edit the "thinBasic_Keywords_Usr.ini" with the names you want, look at "thinBasic_Keywords.ini" for help.

    When the module becomes official Eros can add it to the "thinBasic_Keywords.ini" file.

    Mike
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  3. #3

    Re: How to enable syntax highlighting for my new commands?

    hello mike
    first i was thinking LoadLocalSymbols would do the job.

    thank you

    Joshy
    (Sorry about my bad English.)

  4. #4
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: How to enable syntax highlighting for my new commands?

    Hi Joshi,

    you can also change the thinBasic.CreateSyntaxIni script located inside the thinAir/SYntax folder. Add your module there, run the script and restart thinair. Of course, when you reinstall thinbasic, this mod is gone.

  5. #5
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: How to enable syntax highlighting for my new commands?

    Quote Originally Posted by D.J.Peters
    hello mike
    first i was thinking LoadLocalSymbols would do the job.

    thank you

    Joshy
    I think your confusing interpreter with editor
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  6. #6

    Re: How to enable syntax highlighting for my new commands?

    Quote Originally Posted by Michael Clease
    I think your confusing interpreter with editor
    not realy i wrote all 15 plugins for Basic4GL
    a IDE can work with an interpreter hand in hand (this is clever and simple)

    if an interpreter or compiler parsed a module he knows all new keywords and const
    so it's simple to update any syntax files.

    Joshy
    (Sorry about my bad English.)

  7. #7
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: How to enable syntax highlighting for my new commands?

    So what your suggesting is if I write some code and it has a module included thinAir should then go off and find all the keywords and add them.

    [code=thinbasic]
    USES "ITS","SO","EASY","BUT","SOMEWHAT","OTIOSE"
    [/code]
    would result in thinAir scanning each dll and adding any keywords, is that as you type or after a special button press¿

    Perhaps you should suggest that to Eros or because you've written all 15 plugins for BASIC4GL you should be rewriting thinAir.

    Mike
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  8. #8

    Re: How to enable syntax highlighting for my new commands?

    if you call the interpreter manualy (without thinAir) it will only interpret your script.

    but if thinAir call's the interpreter it can tell the interpreter "please update all new keyword"

    thinBasic.exe best_script_ever.tbasic -refresh_keywords

    the line USES "MyModule" would then create

    drive:\thinBasic\thinAir\Syntax\MyModule.ini

    simple and sexy :-)

    Joshy

    edit:

    cool i found

    APP_ListKeywords
    APP_ListEquates

    (Sorry about my bad English.)

  9. #9
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: How to enable syntax highlighting for my new commands?

    I see what you are saying but if I open a script to edit and add a new module it wont do the highlighting until I execute the script from what your saying but no reason if the editor sees a new module added removed it cant go off and find the information.

    thinAir is in the process of being rewritten Eros has taken control of it so if its a feature you want then I would suggest that you suggest it.

    Mike
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

Similar Threads

  1. Syntax highlighting bug? Keywords don't get recognized?
    By Michael Hartlef in forum thinAir General
    Replies: 5
    Last Post: 11-02-2008, 23:39

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •