# Visual Studio Code Pick BASIC Extension

Updated: 10/19/2021, 9:29:48 PM
Created: 10/19/2021, 9:29:48 PM
Last Updated By: Kevin Munoz
Read Time: 2 minute(s)

# Description

Would you like to update your coding environment and inject some color into your work?

Visual Studio Code is a free download which has an extension entitled “MV Basic”.

In jBASE Development and Support, we commonly use folders for our BASIC source code and add a “.b” suffix to enable it to be identified.  Use of the jcompile utility also mandates the use of the “.b” suffix.

The standard syntax definition for the PickBasic extension has no suffix by default, and also uses “.pick” and .”txt”, but it is easy to add the .b”.

For Windows, Visual Studio Code can be downloaded from this location:

https://code.visualstudio.com/download (opens new window)

Visual Studio Code also works on Linux, unfortunately it will only install and work on Red Hat Linux 7/8 (or CentOS 7/8) - see below for installation details.

# Instructions

  • Details of the MV Basic extension can be found here (opens new window)
  • Once Visual Studio Code and the MV Basic extension are installed:
    • On Windows, navigate to the C:\Users\<yourname>\.vscode\extensions\mvextensions.mvbasic-2.x.x
    • On Linux, navigate to /home/<yourname>/.vscode/extensions/mvextensions.mvbasic-2.x.x

      Note #1: If you graduate to using the Insiders version of Visual Studio Code the ".vscode" folder becomes ".vscode-insiders"

  • Open the package.json file in Visual Studio Code
  • Under the “languages, extensions” tag, set your preferred suffixes:

MVBasicExtensions

  • Under the "MVBasic.languageType" tag, set "jBASE" as your preferred language:

MVBasicLanguage

  • Save the changes. When the changes are saved, Visual Studio Code should invite you to reload, otherwise, exit and restart. You can then edit individual items or open a complete folder.  It is also possible to change other settings such as font size, font family, tab size and whether “autosave” is enabled or not:

UserSettings

  • End result – syntax highlighting:

EncryptTest

Note #2:

To install Visual Studio Code on Linux, proceed as follows:

[[email protected] ~]$ sudo su -
[sudo] password for mikestre:
Last login: Tue May 15 17:29:41 BST 2018 on :1
[[email protected] ~]# rpm --import https://packages.microsoft.com/keys/microsoft.asc
[[email protected] ~]# sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
[[email protected] ~]# yum check-update
[[email protected] ~]# yum install code
1
2
3
4
5
6
7

When updates for Visual Studio Code are available, they can be installed via “yum update”.

# Syntax

The BASIC syntax definition can be found in the "syntaxes" sub-folder of the extension definition in a "jBASE.tmLanguage.json" and "jBASELanguage.json" items.

From a jBASE point-of-view, as of "mvbasic-2.0.2" the syntax and "Intellisense" is complete, but can be modified to suit.

# Notes

AccuTerm 8 now has a VSCODE connector in addition to WED.
If you prefer a web browser interface, there is now also a VSCode server which offers a browser interface to your code (opens new window)

Back to Coding Corner