Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SASNew to Visual Studio Code? Get it now.
SAS

SAS

HTS

|
10,138 installs
| (1) | Free
Visual Studio Code SAS Syntax
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Studio Code SAS Syntax

VS Marketplace Version Total Install

Syntax highlighting for SAS in Visual Studio Code

Features

Syntax Highlighting

  • Comment
  • Constant and string
  • Macro
  • System option
  • ODS statement
  • Global statement
  • Function
  • Data step
  • Data set option
  • Format and informat
  • SQL procedure
  • Base SAS procedures: statistical procedures
  • Base SAS procedures
  • SAS ODS Graphics: procedures
  • SAS/GRAPH procedures
  • Output Delivery System: Procedures
  • SAS/STAT procedures

Theme

  • Dark+ (SAS): A color theme based on Dark+ (default dark)

Examples:

Data step

SQL procedure

Statistical procedure

Procedure

Macro

Installation

  • In VS code, open Extensions (Ctrl+Shift+X) and search for hui-ts.vscode-sas to install it; or
  • Click Install button in the VS maketplace page to install it in VS code.

Extension Settings

Syntax Highlighting

  1. Click Select Language Mode button in the bottom-right corner
  2. Search for SAS
  3. Select SAS (sas)

Theme

  1. File > Preferences > Color Theme
  2. Select Dark+ (SAS)

Known Issues

  • Some SAS keywords consist of more than one word. The highlighting will not work when these keywords are split into different lines. It is a limitation of TextMate grammar.

Bugs

Please open a new issue. However, I only update it from time to time.

Release Notes

Read changelog.


Contributions

  • If you are new to VS Code language extensions, you may read Language Extensions Overview. Moreover, you may read this TextMate manual and this tutorial for TextMate grammar.
  • If you want to play with this project, you can download it and run npm i in the terminal to install the required dependencies. Then, you may make some changes in /syntaxes-yaml/sas.tmLanguage.yaml and then press F5 to see the effect.

More

  • I develop this project because I need a SAS syntax highlighter to facilitate my work, but the existing SAS syntax highlighters have some bugs in my SAS code. Thus, I focus only on the syntax I need but do not exclude the possibility of implementing more syntax highlighting.
  • Not until developing the TextMate grammar for SAS did I realise it was pretty tough. The reason is SAS syntax has no simple but universal rules.
  • If you like this extension, you may buy me a coffee. Buy Me a Coffee at ko-fi.com
  • Enjoy!
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft