Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>License Header ManagerNew to Visual Studio Code? Get it now.
License Header Manager

License Header Manager

Angelo Breuer

|
4,039 installs
| (9) | Free
A visual studio code extension for adding and managing license headers.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Table of Contents

  • License Header Manager
  • Supported Languages
  • Adding support for your language
  • Customizing License Headers
  • Create LICT-Files
  • Edit LICT-Files
  • Exclude Files
  • Exclude Folders
  • Noteworthy things

License Header Manager

The License Header Manager allows you to quickly add license headers to your project files. If the license header already exists, it is overwritten so the license header does not always have to be removed to update it. The License Header Manager offers many different ways to create your license header.

Demonstration


Supported Languages:

  • ActionScript
  • Batch Scripts (.bat / .cmd)
  • C#
  • C++ (+ Arduino / Processing)
  • Clojure
  • CSS
  • D
  • F#
  • Go
  • HTML
  • Java
  • JavaScript
  • JSX
  • Kotlin
  • Lua
  • MATLAB
  • Pascal
  • Perl
  • PHP
  • PowerShell (.ps)
  • Python
  • Ruby
  • Ruby
  • Rust
  • SASS
  • Scala
  • SCSS
  • Shell Script (.sh)
  • Swift
  • TypeScript
  • XML

Adding support for your language

We're supporting a bunch of languages out-of-house, but if you want you can add some at yourself:

Adding languages (Animated GIF)

First go to your settings.json and add the following:

{
    "license-header-manager.additionalCommentStyles": [{
        "extension": ".ext",
        "commentStart": " /*",
        "commentMiddle": " * ",
        "commentEnd": " */"
    }]
}
`

These are the default values for the most common languages.

Property Description Default Required
extension The file extension for the language. < none > yes
commentStart The sequence a comment block starts with. /* yes
commentMiddle The line prefix before a license header line. * yes
commentEnd The sequence a comment block ends with. */ yes
fileHeader The file header. (for example: <?php) undefined no

Customizing License Headers

LICT (License Template)-Files contains the license header for your files:

Example LICT-File


Create LICT-Files

Press Ctrl+Shift+P and type 'Create new License Template'. The input the file type you want to create a template for (with or without dot).

Create LICT-Files (Animated GIF)

The default template describes the possible replacements:

Replacement Description Example
File The current file. index.js
Path The absolute path to the current file. U:\Workspace\My Project\index.js
CurrentYear The current year. 2019
CurrentMonth The current month. 2
CurrentDay The current day. 28
CreationYear The year when the file was created. 2018
CreationMonth The month when the file was created. 1
CreationDay The day when the file was created. 12
Date The current date. 28. 02. 2019
Username The current user logged-in. Anonymous
CopyrightYear The year range the copyright is for (For example: the file was created in the current year then the CopyrightYear is the creation date, used to avoid 2019-2019) 2018-2019 or 2019.

Edit LICT-Files

To edit LICT-Files you can go to your workspace folder under '.vscode' and 'templates' the LICT-files are located.

Or you can edit the files using Ctrl+Shift+P and 'Edit License Templates'. Then select the license file you want to edit.

Edit LICT-Files using Command (Animated GIF)

Inserting License Headers

Press Ctrl+Shift+P and type 'Add license headers'. This will add the license header templates to your files.

Inserting License Header (Animated GIF)

No matter how often you insert your license headers the license header will be inserted only once. When you edit your license header you can run the command again and the license header updates.


Exclude files

To exclude files you can add the following to your settings.json:

{
    "license-header-manager.excludeExtensions": [
        ".h",
        ".cpp",
        ".java"
    ]
}

The above will exclude .h, .cpp and .java files when adding license headers.

Exclude Folders

To exclude folders you can add the following to your settings.json:

{
    "license-header-manager.excludeFolders": [
        "node_modules"
    ]
}

The above will exclude all files that have a 'node_modules' in their path:

  • ./abc/node_modules/abc/ (Excluded)
  • ./abc/node_modules (Excluded)
  • ./abc/node_modules/abc/xyz/mno (Excluded)
  • ./node_modules (Excluded)
  • ./project_files/node_modules/index.js (Excluded)
  • ./project_files/index.js (Included)
  • ./project_files/some_file/index.js (Included)

Noteworthy things

LICT-File Replacement Suggestion

In LICT-Files the available license header replacements are suggested when you type a '%':

LICT-File Replacement Suggestion (Animated GIF)

Don't forget saving and re-adding license headers after updating the LICT-file.


LICT-File Highlighting

In LICT-Files all valid replacements are highlighted orange.

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