sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
47.74k stars 1.19k forks source link

Add VBScript syntax #2075

Open philippe-elsass-deltatre opened 2 years ago

philippe-elsass-deltatre commented 2 years ago

Syntax: VBScript

Guideline Criteria: https://packagecontrol.io/packages/VBScript (80k+ downloads, 15k on Mac/Linux)

Although VBScript isn't that popular on Mac/Linux, the syntax is used for a number of basic-inspired languages like BrightScript.

philippe-elsass-deltatre commented 2 years ago

Oh no, it looks like it's an old syntax format and doesn't have a .sublime-syntax.

keith-hall commented 2 years ago

Have you tried using the ASP syntax bundled with bat? https://github.com/sublimehq/Packages/blob/759d6eed9b4beed87e602a23303a121c3a6c2fb3/ASP/ASP.sublime-syntax

philippe-elsass-deltatre commented 2 years ago

@keith-hall good call, but it doesn't work - code highlighting is only active inside specific markup.

philippe-elsass-deltatre commented 2 years ago

I could convert the old tmLanguage VBScript syntax to .sublime-syntax with https://github.com/aziz/SublimeSyntaxConvertor and it seems to be working OK. Certainly cumbersome to set up though.

keith-hall commented 2 years ago

@keith-hall good call, but it doesn't work - code highlighting is only active inside specific markup.

seems like it works fine here image

philippe-elsass-deltatre commented 2 years ago

Hmm OK I was confused that bat --list-languages would report HTML (ASP) and not ASP.

That said, while better than nothing, this ASP syntax configuration (right) seem specialised to basic ASP scripting and is quite limited (and often confused) compared to the VBScript one (left):

image
sharkdp commented 2 years ago

Okay. I'd be in favor of adding the specialized VBScript syntax. What do you think @keith-hall?

keith-hall commented 2 years ago

Yes, I think it makes sense to have a specialized VBScript syntax, because although similar to ASP, the ASP syntax definition is very strict.