MVVS: MV Basic for Visual Studio

 View Only

 Basic programs recognized as Plain Text

Enrique Murphy's profile image
Enrique Murphy posted 10-25-2022 10:52
Hi,
  I just installed the MV Basic VS Code Extension. I could open a Git folder with Basic programs, connect to the U2 server, and compile! 

  But I have a problem. The source file is not BP, has another name, and every program I open is recognized as "Plain Text". I have to click on "Plain Text" and then select "Rocket MV Basic" as language.

  Is there any place where I should indicate the association to all the programs in the folder?

  Regards,
  Enrique
Chao Han's profile image
ROCKETEER Chao Han
Hi, Enrique.

You can specify file name and related language in the VS Code "File:Associations" setting, then when you open these files, it will automatically activate "Rocket MV BASIC" extension and setting language as BASIC for the source.

Please refer to below link for more details:
    https://rocketsoftware.github.io/rocket-mvbasic/usage/FAQ/

Best Regards.
Charles.
Enrique Murphy's profile image
Enrique Murphy
Hi Charles,
  Thanks for your answer. I hadn't see those FAQ. I also created a case in Rocket support, and they gave me this answer that also worked:

Once Rocket MV Basics extension has been activated, you can navigate to .vscode > setttings.json and modify the "files.associatons". You can modify this to your liking, for testing purposes I added the following bottom two lines to automatically associate all files in the directory to automatically start in the Rocket MV Basics language:
"files.associations": {
        "**/.rmv/config/**""jsonc",
        "**/.vscode/**""jsonc",
        "**/**""rocket-mvbasic"
    }

  I have also configured a task for cataloguing subroutines from VS Code, so now I can edit, compile, catalog and mantain a GitHub repository from VS Code! 
  My congratulations to the MVVS team, now we've got a really cool dev environment!

Chao Han's profile image
ROCKETEER Chao Han
Hi, Enrique.
Thanks for your feedback, that settings works too.

Just fyi:
    1. This  "setttings.json" file is account/folder based configuration file, if you opened another folder in the VS Code, then you need to update this again.
    2. You are using "**/**" as the file pattern,  so if you opened non-BASIC files in this account/folder, then you probably will see some syntax error reported since they are BASIC.

Feel free to contact with us if you have any questions or suggestions, that's really very important for our team, thanks.

Best Regards.
Charles.
Enrique Murphy's profile image
Enrique Murphy
Finally, I added the two MV Basic source tables to the Settings, as @Chao Han suggested, following this link:

 https://rocketsoftware.github.io/rocket-mvbasic/usage/FAQ/

  As all the records in those files are MV Basic.

  Thanks!