# Visual Studio Code Pick BASIC Extension

Updated: 10/19/2020, 10:24:56 AM
Created: 10/19/2020, 10:24:56 AM
Last Updated By: Daniel Klein
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 “jcompile” 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

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

  1. Details of the MV Basic extension can be found here

  2. Once Visual Studio Code is installed:

a) on Windows, navigate to the “C:\Users\<yourname>.vscode\extensions\mvextensions.mvbasic-2.0.x”

b) on Linux, navigate to "/home/<yourname>/.vscode/extensions/mvextensions.mvbasic-2.0.x"

# Note #1

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

and 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
3. 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 4. 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.

Back to Coding Corner