IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact
You are here: Home / How To / How to Make Visual Studio Code Colorize Classic ASP Code

How to Make Visual Studio Code Colorize Classic ASP Code

If you still have to do development with Classic ASP or VBScript and you want to use Visual Studio Code, you’ll soon find out that even though the code editor was built by Microsoft, there’s no language colorization support for ASP code by default. Fortunately, adding the feature can be done easily using Extensions. So here are the steps to do so:

  1. Launch Visual Studio Code and click on Go and select Go to File… or just press CTRL-P.

    Visual Studio Code Goto File

  2. On the dialog box, type in the following: ext install classic asp and press [ENTER].

    Another way to do it, you can just click on the Extensions icon (it should be the last one on the left-hand side (or press CTRL+SHIFT+X) and type in classic asp in the search box.

    Visual Studio Code Ext Install Classic ASP

  3. Select Classic ASP by Ilya Verbitskiy and click on the Install button as shown below:

    Visual Studio Code Extensions Marketplace for Classic ASP

  4. Once installed, we still have to associate the asp file extension to the newly ASP colorizer so we don’t have to manually select ASP as the language every time we open an ASP file. As it is now, Visual Studio Code still has no way to detect it as an ASP page so it will treat it as an HTML file.

    From the File menu, open Preferences and select Settings (CTRL + ,).

    Visual Studio Code Preferences Settings

  5. In Search settings box, type in “file associations” and you can either click on the Add Item button and populate the Item and Value (option 1), or you can click on link Edit in settings.json (option 2). In the older version of Visual Studio Code, only option 2 was available, but now if you only have a few entries, option 1 would be easier to do.

    Visual Studio Code Settings File Associations

  6. If you chose option 1, after adding the items, if you clicked on Edit in settings.json you should see the following:

    "files.associations": {
      "*.asp": "asp",
      "*.vbs": "asp",  // optional
      "*.inc": "asp"   // optional
    }
    

    Visual Studio Code file associations User Settings

    If you chose option 2 though, you have to add those in yourself.

  7. Save the file (CTRL-S) and close it.

That’s all there is to it, now you every time you open an asp file (or vbs script for that matter), the selected Language Mode will be set to ASP and any classic ASP code will be colorized accordingly.

This is not limited to ASP only, you can always look for any language of your choice by going to Visual Studio Marketplace.

Further Reading

Adding Language Colorization
How to Reassign Shortcut Key for Column Selection in Visual Studio Code

Download

Visual Studio Code
Classic ASP (Classic ASP Language Support) – Ilya Verbitskiy

June 3, 2016 Filed Under: How To Tagged With: Classic ASP, Code Editor, Microsoft, Visual Studio Code

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to Check Installed .NET Framework Version
  • How to Remove .NET Runtime and SDK on Mac
  • How to Solve Intermittent 403 Error in IIS
  • How to Show Hidden Folders and Files in Mac Finder
  • How to Solve MS Office VBA Compile Error UserAuthentication

Recent Posts

  • How to Check Installed .NET Framework Version
  • How to Remove .NET Runtime and SDK on Mac
  • How to Solve Intermittent 403 Error in IIS
  • How to Show Hidden Folders and Files in Mac Finder
  • How to Solve MS Office VBA Compile Error UserAuthentication
  • RSS

Tags

.NET Access AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP Python Simple Mail Transfer Protocol Smtp Server Social Media SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows Server

Copyright © 2011-2022 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure