Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Simple Comment HeaderNew to Visual Studio Code? Get it now.
Simple Comment Header

Simple Comment Header

French Koala

|
938 installs
| (1) | Free
Adds a simple comment header with some useful info to the current file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Simple Comment Header

Tests License version updated

Simple Comment Header writes a simple comment header to the current window with some useful information.

> Insert Comment Header

Insert Comment Header

Features

Writes a comment header containing the user name, the current date and the file name.

Options to show or hide file name and creation date.

It should not insert headers on files starting with comments.

It DOES NOT update headers based on the settings, you must delete the header and run the command again.

Notifications:

Notifications

Supports:

  • C
  • C++
  • CSS
  • Javascript
  • Java (untested)
  • PHP (untested)
  • Swift (untested)
  • Any language that uses /* */ for comments

Will not function correctly with other programming language, work in progress

Usage

Keyboard

  • Shortcut
key command
Shift + Alt + C Insert comment header

Command Palette

Command Effect
Insert Comment Header Insert Comment Header
comhead Insert Comment Header

Example:

Commands

Insert Comment Header and comhead are equivalent.

Configuration

  • myheader.userName: Username displayed in the header comment. Default: User name
  • myheader.showDate: If enabled, adds creation date. Default: true
  • myheader.showFileName: If enabled, add current file name. Default: true
  • myheader.showNotifs: If enabled, displays a Notification when creating a header and a Warning if the header has already been created. Default: true

Testing

CI

Automated testing via github actions workflows

CLI

  • Install nodejs and dependencies
  • npm install
  • Run tests
  • npm run test

You can use vsce to package and test your changes. vsce doc

Contributing

nocode: Feel free to open an issue to discuss features, requests, questions ...

code: Fork + Issue (why, what) + PR (tested if possible) + Documentation

Thanks !

License

MIT

Release Notes

ChangeLog

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