scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3k stars 549 forks source link

add visual basic (VB) #341

Open eabase opened 3 years ago

eabase commented 3 years ago

add highlight code for Visual Basic, VB (*.vb).

scopatz commented 3 years ago

PRs welcome!

LoganDark commented 3 years ago

Who edits vb files with nano? VB is a Windows language used by Windows people who don't use Nano

igorkravitz commented 3 years ago

We really need nanorc for VB.NET, nano is the best code editor, we use nano inside git bash for windows to edit files vb.net

LoganDark commented 3 years ago

We really need nanorc for VB.NET, nano is the best code editor, we use nano inside git bash for windows to edit files vb.net

Do you use MSVC for embedded development too?

igorkravitz commented 3 years ago

We really need nanorc for VB.NET, nano is the best code editor, we use nano inside git bash for windows to edit files vb.net

Do you use MSVC for embedded development too?

No, I don't use MSVC. Is it a tool for C, C ++? I just use git bash for windows 10, I really like this set of tools. From git bash I compile vb.NET using dotnet from Microsoft.NET SDK 5.0x64. I am a beginner developer .NET, so I write console applications vb.NET, C# for Windows. Of course, there is hyper-v, and the installation of ubuntu into it, there is mingw64, msys, cygwin, there is vsl2, but for my level this is not necessary, and they take up a lot of disk space, and visual studio and visual studio code steals too much memory computer vs nano, I don’t know how to do debugging yet, and a form designer, but these are solvable issues.

eabase commented 3 years ago

@LoganDark

Who edits vb files with nano? VB is a Windows language used by Windows people who don't use Nano

Who says, Windows people don't use Nano? I know dozens of people who's been using Cygwin for decades, before the arrival of WSL, and still even now, as WSL is PITA in terms of bloat or usage. Fire up Cygwin install Nano, done!

Other users include data scientists, security researchers and system & network operators etc etc.

Unfortunately, we're not able to get rid of VB, so in terms of editing nano is the absolutely best and quickest way to edit anything from CLI. I do a lot of CLI, PWSH, Bash windows hacking and tweaking, not being able to read VB is sometimes a PITA for larger scripts. I've made a nanorc for Arduino config files. That was not easy, and I spent way to much time doing that, but at least I knew the config file and how it works. I'm not a VB person, so it would take me 4-10x the time to get anything remotely correct for VB.

LoganDark commented 3 years ago

@LoganDark

Who edits vb files with nano? VB is a Windows language used by Windows people who don't use Nano

Who says, Windows people don't use Nano? I know dozens of people who's been using Cygwin for decades, before the arrival of WSL, and still even now, as WSL is PITA in terms of bloat or usage. Fire up Cygwin install Nano, done!

Other users include data scientists, security researchers and system & network operators etc etc.

Unfortunately, we're not able to get rid of VB, so in terms of editing nano is the absolutely best and quickest way to edit anything from CLI. I do a lot of CLI, PWSH, Bash windows hacking and tweaking, not being able to read VB is sometimes a PITA for larger scripts. I've made a nanorc for Arduino config files. That was not easy, and I spent way to much time doing that, but at least I knew the config file and how it works. I'm not a VB person, so it would take me 4-10x the time to get anything remotely correct for VB.

I did not consider the case of actual CLI users encountering legacy scripts written in VB. My bad.

Also: I never said no Windows users use nano. I said the sort of person who would be writing Visual Basic scripts, probably wouldn't be. I know WSL exists, I use it myself. Same for Cygwin and other unix-like environments.

"Windows people who don't use Nano" is a subset of all people who use Windows.

mobluse commented 2 years ago

VB/VBA is BASIC and BASIC is still used in embedded systems and for retro computing. E.g. MMBasic is available for Raspberry Pi Pico (RP2040) and is similar to VB. Also other BASIC files for e.g. Apple II and C64 could use the same syntax coloring as for VB. vim supports syntax coloring of bas-files, but I prefer nano. You might want to port an old BASIC program to e.g. PHP, since PHP has goto. I've done so, and then it's useful to have syntax coloring of the BASIC code.

mobluse commented 1 year ago

I did find this for MMBasic which inludes a lot of Visual Basic (VB): https://github.com/thwill1000/mmb4l/blob/main/resources/mmbasic.syntax.nanorc

davidhcefx commented 5 months ago

I did find this for MMBasic which inludes a lot of Visual Basic (VB): https://github.com/thwill1000/mmb4l/blob/main/resources/mmbasic.syntax.nanorc

@mobluse Can you please extract the parts that are relevant to VB? I'll like to make a PR to galenguyer/nano-syntax-highlighting as well as here!

mobluse commented 4 months ago

I did find this for MMBasic which inludes a lot of Visual Basic (VB): https://github.com/thwill1000/mmb4l/blob/main/resources/mmbasic.syntax.nanorc

@mobluse Can you please extract the parts that are relevant to VB? I'll like to make a PR to galenguyer/nano-syntax-highlighting as well as here!

No, I am not that interested in that. I think mmbasic.syntax.nanorc works well for my purposes. In order to convert it to VB one would not only have to remove parts, but also add. And which version of VB should one support? I don't know VB that well anymore. BTW QBasic is the foundation of VB. When you say to Chat GPT to write programs in BASIC it defaults to QBasic it seems.