Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Classic ASP Language SupportNew to Visual Studio Code? Get it now.
Classic ASP Language Support

Classic ASP Language Support

ashtonckj

|
1,490 installs
| (2) | Free
| Sponsor
Formatting, IntelliSense, Auto-Completion, and Syntax Highlighting for Classic ASP files with HTML, CSS, JavaScript, SQL, and VBScript.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Classic ASP Language Support Logo
Classic ASP Language Support for VSCode

Version: 0.7.0 License: MIT


📸 See It In Action

Using Catppuccin Theme

Formatting Before & After SQL Syntax Highlighting

🚀 Quick Start

Action Shortcut
Format document Alt + Shift + F (Win/Linux) · Option + Shift + F (Mac)
Trigger IntelliSense Ctrl + Space or just start typing
Insert snippet Type prefix → Tab
Go to definition F12 or Ctrl + Click
Rename symbol F2
Parameter hints Ctrl + Shift + Space (or type ( after a Sub/Function name)
Go to symbol in file Ctrl + Shift + O
Go to symbol in workspace Ctrl + T
Follow include link Ctrl + Click on the file path

✨ Features

Applies to .asp and .inc files.

🎨 Smart Formatting

  • Multi-language — VBScript, HTML, CSS, JavaScript, and SQL in a single keystroke
  • VBScript — smart indentation across all control structures and multi-block <% %> regions
  • HTML/CSS/JS — formatted by Prettier, fully configurable
  • Keyword casing — your choice of PascalCase, UPPERCASE, or lowercase
  • Format Selection — Ctrl + K Ctrl + F formats just the selected lines, exactly as Format Document would format them
  • Preview Formatting — run Classic ASP: Preview Formatting from the Command Palette to see what Format Document would change, side by side, without applying it

💡 IntelliSense & Auto-Completion

  • Context-aware — correct suggestions whether you're in ASP, CSS, JS, or HTML
  • COM object tracking — type rs. after Set rs = Server.CreateObject("ADODB.Recordset") to see all methods and properties, or just . inside With rs … End With
  • HTML attribute values — inside type="", target="" and the like, the values the attribute takes, as in a .html file
  • Cross-file IntelliSense — variables and functions from #include'd files appear in suggestions automatically
  • File paths — live browsing inside #include and href/src/action attributes

🔍 Hover, Definition & Navigation

  • Hover docs — inline documentation for keywords, functions, constants like vbCrLf, Response and the other ASP objects, COM members, HTML tags and attributes, and CSS properties
  • Go to definition — F12 across the current file and all included files
  • Find All References — Shift + F12 on a VBScript name, over the same scope rename uses
  • Rename symbol — F2 on a VBScript variable, constant, Sub or Function; locals stay inside their own body, globals are renamed across the include graph, and a member like obj.total is left alone
  • Update #include paths — rename or move a file in VS Code and it offers to fix every #include that pointed at it
  • Parameter hints — signature help for VBScript's built-in functions (Mid, InStr, Replace…), your own Subs and Functions, and JavaScript in <script> blocks
  • Linked editing — with editor.linkedEditing on, editing a tag name edits its closing tag too, ASP between them or not
  • Outline & breadcrumbs — Subs, Functions, Classes and Consts (plus JavaScript functions) in the Outline view and Ctrl + Shift + O
  • Workspace symbol search — Ctrl + T finds VBScript symbols across every .asp / .inc in the workspace
  • Document links — Ctrl + Click navigation on #include paths and local file attributes, including root-relative (/images/logo.gif) ones

🌈 Syntax Highlighting

  • ASP regions — toggleable background colouring for <% %> blocks, light and dark themes
  • Semantic colouring — user-defined functions and sub names
  • Smart SQL — highlights SQL inside strings; plain strings are left untouched

🔴 Diagnostics

  • HTML — mismatched structural tags flagged with orange squiggles
  • VBScript — unmatched control blocks (If/End If, Sub/End Sub, For/Next, etc.) and unbalanced <% %> tags
  • Missing Set — an object assigned without Set, like rs = conn.Execute(sql), with a one-click quick fix
  • Missing includes — an #include whose file does not exist, which IIS refuses to run
  • VBScript checks — a name declared twice, an undeclared name under Option Explicit, and a call with the wrong number of arguments; a Dim never used and code after Exit Sub are shown faded
  • CSS — errors and warnings inside <style> blocks and style="" attributes as you type
  • JavaScript — real errors inside <script> blocks via the TypeScript language service (noise from missing project context is suppressed)
  • Void elements — invalid closing tags caught with a one-click quick fix

⌨️ Smart Key Handling

  • Context-aware Enter/Tab — correct indentation inside <% %> blocks automatically
  • Auto de-indent — closing keywords (End If, Next, etc.) de-indent as you type
  • Auto-close — HTML and ASP comment blocks close automatically

📝 Snippets

ASP / VBScript
Prefix Inserts
asp <% %> code block
aspo <%= %> output expression
rw Response.Write("...")
rr Response.Redirect("...")
rf Request.Form("...")
rq Request.QueryString("...")
sco Server.CreateObject("...")
dbconn Full ADODB.Connection open/close template
rs Full Recordset open → loop → close template
inc <!--#include file="..."-->
HTML
Prefix Inserts
html5 HTML5 boilerplate
! <!DOCTYPE html>
table Table with <thead> and <tbody>
form Form with action and method
divc / divid Div with class / ID
script:src External script tag
link:css Stylesheet link tag
JavaScript
Prefix Inserts
log console.log()
fetch Fetch API with .then() / .catch()
listener addEventListener with handler
gebi document.getElementById()
qs document.querySelector()
timeout setTimeout with callback

🔌 Compatibility

Extension Status Notes
Prettier ✅ Integrated Already bundled — no separate install needed
Error Lens ✅ Compatible Displays diagnostics inline
GitLens ✅ Compatible Git blame, history, and code insights
Indent Rainbow ✅ Compatible Colour-coded indentation levels
Lorem Ipsum ✅ Compatible Quick placeholder text insertion
Color Highlight ✅ Compatible Highlights CSS colour values inline
Better Comments ✅ Compatible Colour-coded comment annotations
Inline Bookmarks ✅ Compatible In-editor bookmark tracking
HTTP Status Codes ✅ Compatible HTTP status code reference on hover
ASP HTML Tag Matcher ✅ Compatible Highlights matching HTML tags in ASP files
Auto Rename Tag ⚠️ Partially Compatible Rename opening/closing HTML tags together
HTML CSS Support ⚠️ Caution May conflict with built-in HTML completions — but may be fine
ASP Classic Support ❌ Incompatible Already integrated into this extension
Classic ASP Syntaxes & Snippets ❌ Incompatible Already integrated into this extension

💡 Bracket pair colourisation works natively with ASP files — enable it via editor.bracketPairColorization.enabled and editor.guides.bracketPairs in VS Code settings.


⚙️ Configuration

📋 Full Settings List

VBScript Formatting

Setting Default Description
classicAsp.keywordCase PascalCase lowercase · UPPERCASE · PascalCase
classicAsp.aspTagsOnSameLine false Keep <% %> on the same line as code
classicAsp.htmlIndentMode continuation Where <% and %> sit: continuation — at the indent of the surrounding HTML; flat — at column 0. The VBScript inside is indented the same either way
classicAsp.virtualRoot (empty) Absolute path to your IIS application root, used to resolve #include virtual="..." and root-relative href/src. Empty = the workspace folder root
classicAsp.defaultIncludes (empty) Files always added to IntelliSense, hover, and Go to Definition for every document, even without an #include for them. For libraries pulled in through a shared bootstrap page at runtime. Resolved like #include virtual="..."

Prettier (HTML/CSS/JS)

Setting Default Description
classicAsp.prettier.printWidth 80 Wrap lines at this column width
classicAsp.prettier.tabWidth 2 Spaces per indentation level
classicAsp.prettier.useTabs false Use tabs instead of spaces
classicAsp.prettier.bracketSameLine false Put > on last attribute line
classicAsp.prettier.semi true Add semicolons in JavaScript
classicAsp.prettier.singleQuote false Use single quotes in JavaScript
classicAsp.prettier.arrowParens always Arrow function parentheses
classicAsp.prettier.trailingComma es5 Trailing comma style
classicAsp.prettier.endOfLine auto Line ending style — auto keeps the endings the file is already saved with
classicAsp.prettier.htmlWhitespaceSensitivity css HTML whitespace handling

Syntax Highlighting

Setting Default Description
classicAsp.highlightAspRegions true Highlight ASP regions
classicAsp.bracketLightColor rgba(255, 100, 0, 0.15) Bracket colour (light theme)
classicAsp.bracketDarkColor rgba(0, 100, 255, 0.15) Bracket colour (dark theme)
classicAsp.codeBlockLightColor rgba(100, 100, 100, 0.04) Code block colour (light)
classicAsp.codeBlockDarkColor rgba(220, 220, 220, 0.04) Code block colour (dark)

📋 Known Limitations

  • ASP blocks must be properly closed (<% ... %>) for formatting and diagnostics to work correctly
  • Format Document and Format Selection are refused while a file has structure diagnostics. Fix the orange squiggles first — formatting a file with unbalanced tags or blocks would rearrange the wrong things
  • Complex mixed HTML/ASP structures may occasionally require manual adjustment after formatting
  • #include virtual="..." and root-relative href/src paths resolve from classicAsp.virtualRoot, or the first workspace folder root when that is empty
  • Syntax highlighting breaks for a <%= %> that emits an HTML tag inside a JavaScript event-handler attribute — e.g. onclick="alert('<%= Replace(x, vbCrLf, "<br>") %>')". VS Code's built-in HTML and JavaScript grammars own attribute-value parsing, so an extension cannot re-scope it. The code still runs correctly; only the colours are wrong. (For the same reason the closing " of a style="" value is coloured as CSS — that affects plain HTML files too.)
  • Smart Enter/Tab indent follows the editor's editor.tabSize, while Format Document follows classicAsp.prettier.tabWidth. Set them to the same value if you want typing and formatting to agree

🛠️ Development

Building from Source

Prerequisites: Node.js 20+ · VS Code 1.80+

git clone https://github.com/ashtonckj/Classic-ASP-Language-Support.git
cd Classic-ASP-Language-Support
npm install
npm run compile
# Press F5 in VS Code to launch the Extension Development Host

Tests

npm run test:unit         # fast, vscode stubbed
npm run test:integration  # real Extension Host (Enter/Tab, commands)
npm run lint

🤝 Contributing

Contributions are welcome! If you have ideas, bug reports, or want to improve the extension:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. 💾 Commit your changes (git commit -m 'Add amazing feature')
  4. 📤 Push to the branch (git push origin feature/amazing-feature)
  5. 🎉 Open a Pull Request

🙏 Acknowledgements

This extension wouldn't be possible without these amazing projects:

  • Prettier - HTML, CSS, and JavaScript formatting engine
  • Zachary Becknell ( ASP Classic Support ) - ASP region highlighting implementation
  • Jintae Joo ( Classic ASP Syntaxes and Snippets ) - Snippets inspiration and reference

If you find this extension helpful, please consider leaving a ⭐ on GitHub and a rating on the VS Code Marketplace!
Made with ❤️ for the Classic ASP community

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft