VS Code Extensions
File Header Generator - Auto Insert Header Comments

File Header Generator - Auto Insert Header Comments

by miccho27

Automatically add customizable file header comments when creating new files in VS Code.

Downloads

56

Rating

— (0)

Version

1.0.0

Last updated

Apr 04, 2026

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