Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SBATCH File Syntax Highlighter and SLURM Job SubmissionNew to Visual Studio Code? Get it now.
SBATCH File Syntax Highlighter and SLURM Job Submission

SBATCH File Syntax Highlighter and SLURM Job Submission

Ephi Cohen

|
802 installs
| (0) | Free
Syntax highlighting and job submission for .sbatch files in SLURM.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SBATCH Syntax Highlighting and SLURM Job Submission for VS Code

This extension provides syntax highlighting and job submission features for .sbatch files used with SLURM job scheduling.

Features

  • Syntax highlighting for .sbatch files, including differentiation between active #SBATCH commands and commented ##SBATCH lines.
  • Right-click on .sbatch files to submit a SLURM job directly from VS Code.
  • Right-click on .sbatch files to list all jobs (active and historical) submitted from that file.
  • File icon for .sbatch files for easy identification.

Installation

  • Install the extension from the VS Code Marketplace.

How to Use

  1. Open any .sbatch file in VS Code to see syntax highlighting.
  2. Right-click on the .sbatch file in the file explorer and select:
    • Submit a SLURM Job from This File to submit the job
    • List Submitted Jobs from This File to view active and historical jobs from this script

Syntax Highlighting

Syntax Highlighting

  • Active #SBATCH commands are highlighted in purple.
  • Commented ##SBATCH lines are highlighted in blue.
  • General comments are highlighted in green.
  • The rest of the text follows standard bash syntax colors.

Job Management

List Jobs

View all SLURM jobs (active and historical) submitted from a specific .sbatch file. Click on active job rows to cancel them with scancel.

Requirements

Make sure sbatch and squeue (SLURM commands) are available in your system's PATH.

Release Notes

For build instructions, see build.md For the license, see LICENSE

See CHANGELOG.md for detailed version history.

0.0.2

  • Improved syntax highlighting for SLURM directives with better argument parsing
  • Added language icon for .sbatch files
  • New command to list active jobs submitted from a specific file
  • Removed full icon theme (now using built-in language icon)

0.0.1

  • Initial release with syntax highlighting and SLURM job submission command.

For more information, visit our repository.

Icon

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft