Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>File Header Generator - Auto Insert Header CommentsNew to Visual Studio Code? Get it now.
File Header Generator - Auto Insert Header Comments

File Header Generator - Auto Insert Header Comments

miccho27

|
1 install
| (0) | Free
Automatically insert header comments when creating new files. Supports 20+ languages with correct comment syntax (// # -- /* */ etc). Customizable templates with author, date, license, and description fields.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

File Header Generator

Automatically insert structured header comments when creating new files. Supports 20+ programming languages with correct comment syntax.

VS Code Marketplace Installs License: MIT

Features

  • Auto-insert on file creation — headers are added automatically when you create new files
  • 20+ language support — JavaScript, Python, Ruby, Go, Rust, SQL, HTML, CSS, and more
  • Correct comment syntax — uses /** */ for C-family, # for Python/Ruby/Shell, -- for SQL/Lua, <!-- --> for HTML/XML
  • Auto-update date on save — keeps the @date field current
  • Customizable templates — use placeholders like {{author}}, {{date}}, {{license}}, {{filename}}
  • Manual insert command — run "Insert File Header" from the command palette

Example Output

JavaScript / TypeScript

/**
 * @file    myComponent.js
 * @author  John Doe
 * @date    2026-04-01
 * @license MIT
 *
 * @description TODO: Add description
 */

Python

# @file    utils.py
# @author  John Doe
# @date    2026-04-01
# @license MIT
#
# @description TODO: Add description

SQL

-- @file    migration.sql
-- @author  John Doe
-- @date    2026-04-01
-- @license MIT
--
-- @description TODO: Add description

Settings

Setting Default Description
fileHeaderGenerator.author "" Author name
fileHeaderGenerator.license "MIT" License type
fileHeaderGenerator.autoInsertOnCreate true Auto-insert on new files
fileHeaderGenerator.autoUpdateDate true Update date on save
fileHeaderGenerator.dateFormat "YYYY-MM-DD" Date format
fileHeaderGenerator.includeDescription true Include description placeholder
fileHeaderGenerator.companyName "" Company name for copyright
fileHeaderGenerator.customTemplate "" Custom template with placeholders

Custom Template Placeholders

{{author}}, {{date}}, {{license}}, {{filename}}, {{description}}

Commands

  • File Header: Insert File Header — Insert a header at the top of the current file
  • File Header: Update Last Modified Date — Update the date in an existing header

Supported Languages

C, C++, C#, Clojure, CoffeeScript, CSS, Dart, Dockerfile, Erlang, Go, Haskell, HTML, Java, JavaScript, Kotlin, LaTeX, Less, Lua, Makefile, Perl, PHP, PowerShell, Python, R, Ruby, Rust, Scala, SCSS, Shell, SQL, Swift, TypeScript, XML, YAML

License

MIT

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