English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Blitz Basic (http://eab.abime.net/forumdisplay.php?f=126)
-   -   BB2 Language Definition for the Atom Text Editor (http://eab.abime.net/showthread.php?t=99652)

MickGyver 14 November 2019 19:38

BB2 Language Definition for the Atom Text Editor
 
Similar to my Notepad++ language definition, I have made a BB2 language definition for the free Atom Text Editor. This one has more features and is more robust, it makes development in Blitz Basic 2 quite convenient! :)

Feature include:
  • Syntax highlighting for Blitz Basic 2 source files.
  • Snippets with auto completion for a lot of the Blitz Basic 2 commands.
  • A fully automated build/run process using WinUAE (even automatic BB2 nag screen removal).
  • Easy source navigation with a symbols list that lists functions, statements, macros, labels and todo/fixme/hack comments.
  • Comment / uncomment multiple lines at once.
  • Code folding.
  • Minimap of source files.
  • Themes (all Atom themes work for the BB2 source files).
  • Plus a lot of other conveniences a modern text editor brings.

Please download and test the "beta" version (instructions are included): http://gamephase.net/files/linked/AtomBB2.zip

http://www.gamephase.net/files/linke...ures_small.png

http://www.gamephase.net/files/linked/bb2_atom_dark.png

MickGyver 16 November 2019 13:43

Version 0.2
 
I uploaded a new version with these improvements:
  • Fixed issues with parameters for many functions.
  • Bug fixes to the help system.
  • Added snippets and help for 37 missing libraries.
  • Better documentation in 'run.bat' etc.
Use same download link:
http://gamephase.net/files/linked/AtomBB2.zip

BippyM 16 November 2019 13:56

Interesting, I shall take a look when i get homr tomorrow

Havie 19 November 2019 22:27

This looks really good and I like the fact that folding works.

I have downloaded the files and followed all the instructions as best I can.

When I run the editor, the auto-completion works :)

But...

I don't have syntax highlighting.
I don't have a help pane and F1 doesn't work.
The symbols list isn't working.

And...

Pressing F5 doesn't do anything!

Help me please - I would really like to use this editor to code my games.

Havie 19 November 2019 22:30

Ok - solved syntax highlighting by clicking on asc at bottom of window and choosing Blitz Basic 2 from the pop up list.

MickGyver 19 November 2019 22:54

Quote:

Originally Posted by Havie (Post 1360076)
This looks really good and I like the fact that folding works.

I have downloaded the files and followed all the instructions as best I can.

When I run the editor, the auto-completion works :)

But...

I don't have syntax highlighting.
I don't have a help pane and F1 doesn't work.
The symbols list isn't working.

And...

Pressing F5 doesn't do anything!

Help me please - I would really like to use this editor to code my games.

Hmm, have you saved the config files and restarted Atom? Syntax highlighting should work automatically for files with the .bb2 extension.

Havie 19 November 2019 22:57

Quote:

Originally Posted by MickGyver (Post 1360087)
Hmm, have you saved the config files and restarted Atom? Syntax highlighting should work automatically for files with the .bb2 extension.

Yep. My config file looks like this:

"*":
core:
autoHideMenuBar: true
editor:
fontSize: 16
"exception-reporting":
userId: "d35e05d2-d8c6-4660-aadc-217fe2b9c794"
"atom-shell-commands":
commands: [
{
name: "Show BB2 Help"
command: "C:\\Users\\Havie\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
arguments: [
"{CurWord}"
]
options:
keymap: "f1"
}
{
name: "Build BB2"
command: "cmd"
arguments: [
"/C"
"start"
"{FileDir}\\run.bat"
]
options:
cwd: "{FileDir}"
keymap: "f5"
}
]

Havie 19 November 2019 23:12

Playing around with run.bat I can now get Winuae to appear - ready to run but it's not running...

Havie 19 November 2019 23:16

Have played with run.bat file and Winuae appears but doesn't run (after I realised that my virus software was blocking it from running).

MickGyver 19 November 2019 23:18

I'll have a better look at it tomorrow. By the way, you should be able to toggle the symbols-list from the menus somewhere, can't remember the exact place.

MickGyver 19 November 2019 23:20

Quote:

Originally Posted by Havie (Post 1360092)
Have played with run.bat file and Winuae appears but doesn't run (after I realised that my virus software was blocking it from running).

Damn those antivirus programs...

Havie 19 November 2019 23:22

Here is the message that comes up when the run.bat file runs:

https://ibb.co/C58TVvd

MickGyver 19 November 2019 23:25

Can't see any message? Maybe your antivirus program is blocking some/all of the command line tools (including the help command)?

Havie 19 November 2019 23:26

I'm with you - enough for now - time for bed!

ZZZZzzzzzzzzzzzzzzzzz....

Havie 19 November 2019 23:28

Nope - turned off antivirus and same message pops up. I have obviously done something wrong.

Havie 19 November 2019 23:29

I may need an idiots guide to setting it up...might help others too?

MickGyver 20 November 2019 09:46

Quote:

Originally Posted by Havie (Post 1360103)
I may need an idiots guide to setting it up...might help others too?

There are a few things I came to think of:
  1. If you already have any of the tools BringToFront.exe, ConvertEOL.exe and WinUAEREXX.exe, replace them, because at least BringToFront.exe has been updated.
  2. You need to ensure that your firewall/antivirus allows network traffic for WinUAE and WinUAEArexx.exe.
  3. Ensure that you have all the needed packages installed for Atom (atom-shell-commands, symbols-list etc.)
  4. You can toggle the symbols-list from the menu Packages / symbols-list / Toggle.
  5. The indentation in the config files is important. Below is my config file.
    Code:

    "*":
      "atom-shell-commands":
        commands: [
          {
            name: "Execute run.bat"
            command: "cmd"
            arguments: [
              "/C"
              "start"
              "{FileDir}\\run.bat"
            ]
            options:
              cwd: "{FileDir}"
              keymap: "f5"
          }
          {
            name: "Show BB2 Help"
            command: "C:\\Users\\Mick\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
            arguments: [
              "{CurWord}"
            ]
            options:
              keymap: "f1"
          }
        ]
      "autocomplete-plus":
        confirmCompletion: "tab always, enter when suggestion explicitly selected"
      core:
        disabledPackages: [
          "symbols-view"
        ]
        telemetryConsent: "no"
        themes: [
          "one-light-ui"
          "one-light-syntax"
        ]
      editor:
        fontFamily: "Iosevka, Menlo, Consolas, DejaVu Sans Mono, monospace"
        fontSize: 21
        tabType: "soft"
      "exception-reporting":
        userId: "860f73e9-7355-43ae-a0fc-d099c77724a1"
      "highlight-selected":
        highlightBackground: true
        lightTheme: true
      minimap:
        useHardwareAcceleration: false
      "symbols-list":
        basic: {}
      welcome:
        showOnStartup: false


Etze 20 November 2019 10:44

This is a great development! Now I hope that Sven Dröge manages to remove the connection between the AmiBlitz IDE and the compiler. Then we would have a very competent development environment.

MickGyver 20 November 2019 10:54

Quote:

Originally Posted by Etze (Post 1360155)
This is a great development! Now I hope that Sven Dröge manages to remove the connection between the AmiBlitz IDE and the compiler. Then we would have a very competent development environment.

Yeah, that would be great! :)

twiggy 22 November 2019 12:24

Looking forward to giving this a whirl on my Linux machine.


All times are GMT +2. The time now is 15:25.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.04748 seconds with 11 queries