How run Julia script from BBEdit?

176 views
Skip to first unread message

Murray Eisenberg

unread,
Aug 1, 2021, 1:40:11 PM8/1/21
to BBEdit Talk
In BBEdit 14.0 under macOS Big Sur 11.5.1, I have the following Julia code in a file hello.jl now open in a BBEdit window:

print("Hello, World!\n")

I _have_ installed the Julia Language Module from https://github.com/JuliaEditorSupport/julia-textwrangler-bbedit and restarted BBEDit.

Now how do I do the following?

(1) Let BBEdit know to syntax color the code, etc., as Julia code?

     (I'm seeing no syntax coloring, just entire code in black.)

(2) Run the Julia code in that window? 

     If I use the shebang menu, nothing happens.
     Presumably I have to somehow connect BBEdit to Julia (verxion 1.6.2), which is installed, but how?


Bruce Van Allen

unread,
Aug 1, 2021, 2:58:03 PM8/1/21
to bbe...@googlegroups.com
Hey Murray,

I'm new to Julia as of today, but this might help.

1. Besides installing Julia and the BBEdit language module as you did,
here is my script:

#!/usr/bin/env julia

print("Hello, World!\n")

2. With the script open in BBEdit:

* check in the lower left, that the language widget is set to Julia
(assuming you have that language widget showing - check prefs if not).

* click the little file icon upper right corner, then click
"Permissions", and make sure all users are allowed to execute.

3. Bingo.

# Hello, World!



--
    - Bruce

_bruce__van_allen__santa_cruz__ca_

Murray Eisenberg

unread,
Aug 1, 2021, 3:57:53 PM8/1/21
to BBEdit Talk

Christopher Stone

unread,
Aug 1, 2021, 4:07:07 PM8/1/21
to BBEdit-Talk
On Aug 01, 2021, at 12:22, Murray Eisenberg <murraye...@gmail.com> wrote:

In BBEdit 14.0 under macOS Big Sur 11.5.1, I have the following Julia code in a file hello.jl now open in a BBEdit window:

print("Hello, World!\n")


Hey Murray,

Scripts in BBEdit require a shebang line.



I _have_ installed the Julia Language Module from https://github.com/JuliaEditorSupport/julia-textwrangler-bbedit and restarted BBEDit.

That's all I had to do.

Then use the “Document Language” pop-up menu in the status bar to select “Julia”.

After installing the Julia language plist I did double-check in “Installed Languages” in the preferences to make sure the it was properly installed and activated – and it was.


I don't have Julia installed, so I can't run any test code – but if in fact you don't have a shebang line in your script the failure to run is self-evident.

--
Best Regards,
Chris

Reply all
Reply to author
Forward
0 new messages