JuliaEditorSupport / julia-textwrangler-bbedit

Julia syntax highlighting for Textwrangler and/or BBEdit
7 stars 4 forks source link

Comments are not coloured in TextWrangler 3 #13

Open cesss opened 6 years ago

cesss commented 6 years ago

Hi!

I understand TextWrangler 3 is old, but I keep it in an old machine, and tried this julia plist with it. It seems to work fine, except for comments. Reading at the TextWrangler 3 users manual, appendix C, I checked that the Comment Pattern regex was already supported in TextWrangler 3, so I don't know why it doesn't work (you can realize it doesn't work not only because there's no colouring, but also because if a Julia keyword is located in the comment, it is highlighted (see attached image).

I'm asking here just in case you're old-time TextWrangler users and might have an idea of the reason why it doesn't work. Otherwise, I understand TW3 is old and that perhaps very few people (if any) are currently using it.

I also see for example that some types like Int64 are not highlighted, but Int64 is missing in the plist, so I suppose the plist is still incomplete at this time.

result

scls19fr commented 6 years ago

Hello,

You can add missing keywords to plist in a pull request.

Kind regards

nmatzke commented 5 years ago

Just so this exists on the internet somewhere:

I downloaded the BBEditTextWrangler-julia.plist file and saved it to:

~/Library/Application Support/BBEdit/Language Modules

...as Julia.plist.

However, it wasn't appearing in BBEdit -> Preferences -> Languages -> Installed Languages, and the text of .jl files was not being colored in.

After much googling, I figured this out: To check if the plist file is working, "cd" to the Language Modules directory:

cd ~/Library/Application Support/BBEdit/Language Modules

... and run "plutil".

When I did this, I got an error:

plutil Julia.plist Julia.plist: Encountered unknown tag html on line 8

I realized that this meant I had downloaded the HTML display of the "BBEditTextWrangler-julia.plist" file, not the raw file. If you click the "raw" button on GitHub you can get the original file.

Once I had the raw BBEditTextWrangler-julia.plist file, saved as Julia.plist, it worked:

plutil Julia.plist Julia.plist: OK

...posted for future googlers, likely including me in a few years.

Cheers, Nick