|
Feature | Description |
---|---|
Multiple Language Support | Supports over 100 programming languages and counting! The extension automatically detects the language's comment syntax for precise header insertion. |
Auto Header Insertion (Beta) | Automatically inserts headers into new files of supported languages. |
File Path Comment | Automatically generates and inserts the file's relative path as a comment. |
Custom Comment Syntax | Define custom comment syntax for specific languages that may not be covered by default. |
Customization | Personalize your headers with dynamic placeholders such as: - {author} : Designate the file's author.- {date} : Timestamp your work with the creation or last modified date.- {company} : Attribute the work to a particular organization or entity.- {license} : Specify the license type.- {githubLink} : Include a link to your GitHub repository.- {filePath} : Include the file's relative path.- {line1} : Custom header line 1.- {line2} : Custom header line 2.- {line3} : Custom header line 3. |
Header Layout | Customize the order and layout of the header sections. |
Ignored Paths | Specify file paths or directories to ignore when adding headers. |
📦 Installation
- Launch Visual Studio Code.
- Navigate to Extensions or press
Ctrl+Shift+X
. - In the search bar, type "Auto Header EST.2023" and select the corresponding result to install.
🚀 Usage
Auto-Tagging Configuration
Enable Auto Header:
- Navigate to your VS Code settings.
- Enable
auto-header-est2023.autoHeader
to automatically append headers to new files of supported languages. - Enable
auto-header-est2023.autoGenerateFilePath
to automatically generate and insert the relative path of the file.
Customize Your Header:
- Configure the following settings in your VS Code settings:
auto-header-est2023.author
: Set the author's name.auto-header-est2023.date
: Set the date format (use{timestamp}
for the current date).auto-header-est2023.company
: Set the company's name.auto-header-est2023.license
: Choose the license type from predefined options (e.g., MIT, GPL-3.0).auto-header-est2023.githubLink
: Set the GitHub repository link.auto-header-est2023.line1
,auto-header-est2023.line2
,auto-header-est2023.line3
: Customize additional header lines.
- Configure the following settings in your VS Code settings:
Comment Style:
- Set the preferred comment style:
auto-header-est2023.commentType
: Choose betweensingleline
andmultiline
.
- Set the preferred comment style:
Custom Comment Syntax:
- Define custom comment syntax for specific languages:
auto-header-est2023.customCommentSyntax
: Example:{"mylang": {"single": "##", "multiStart": "/**", "multiEnd": "**/"}}
.
- Define custom comment syntax for specific languages:
Ignored Paths:
- Specify file paths or directories to ignore when adding headers:
auto-header-est2023.ignoredPaths
: Example:[".next", "node_modules"]
.
- Specify file paths or directories to ignore when adding headers:
Custom Header Template:
- Use a custom header template:
auto-header-est2023.customHeaderTemplate
: Example:{single} {author}\n{single} {date}\n{single} {company}\n{single} {license}\n{single} {githubLink}\n{single} {line1}\n{single} {line2}\n{single} {line3}\n
.
- Use a custom header template:
Header Layout:
- Customize the order and layout of the header sections:
auto-header-est2023.headerLayout
: Example:["author", "date", "company", "license", "githubLink"]
.
- Customize the order and layout of the header sections:
Quick Header Generation
- Use the
Ctrl+Shift+SpaceBar
shortcut for immediate header generation.
Command Palette
- Activate the command palette with
Ctrl+Shift+P
. - Search for and select "Add Header".
🔧 Configuration Options
Here are all the available settings you can configure for the Auto Header EST.2023 extension:
Setting | Type | Default | Description |
---|---|---|---|
auto-header-est2023.enabled |
boolean | true |
Enable or disable the Auto Header extension. |
auto-header-est2023.autoHeader |
boolean | false |
Automatically insert headers into new files of supported languages. |
auto-header-est2023.autoGenerateFilePath |
boolean | false |
Automatically generate and insert the file's relative path as a comment. |
auto-header-est2023.commentType |
string | multiline |
Preferred comment style (singleline or multiline ). |
auto-header-est2023.author |
string | "" |
Author's name. Replaces the {author} placeholder. |
auto-header-est2023.company |
string | "" |
Company's name. Replaces the {company} placeholder. |
auto-header-est2023.date |
string | {timestamp} |
Set to timestamp for the current date. Replaces the {date} placeholder. |
auto-header-est2023.line1 |
string | Author: {author} |
First header line. Placeholders: {author} , {date} , {company} . Leave blank to skip. |
auto-header-est2023.line2 |
string | Created: {date} |
Second header line. Placeholders: {author} , {date} , {company} . Leave blank to skip. |
auto-header-est2023.line3 |
string | (c) Copyright by {company} |
Third header line. Placeholders: {author} , {date} , {company} . Leave blank to skip. |
auto-header-est2023.customCommentSyntax |
object | {} |
Custom comment syntax for specific languages. Example: {"mylang": {"single": "##", "multiStart": "/**", "multiEnd": "**/"}} . |
auto-header-est2023.ignoredPaths |
array | [".next", "node_modules"] |
List of file paths or directories to ignore when adding headers. Example: [".next", "node_modules"] . |
auto-header-est2023.license |
string | MIT |
Select the license for the file. Options: MIT , GPL-3.0 , Apache-2.0 , BSD-2-Clause , BSD-3-Clause , ISC , MPL-2.0 , LGPL-3.0 , Unlicense , EPL-2.0 . |
auto-header-est2023.githubLink |
string | "" |
GitHub repository link. |
auto-header-est2023.customHeaderTemplate |
string | {single} {author}\n{single} {date}\n{single} {company}\n{single} {license}\n{single} {githubLink}\n{single} {line1}\n{single} {line2}\n{single} {line3}\n |
Template for the custom header. Use placeholders: {single} , {multiStart} , {multiEnd} , {author} , {date} , {company} , {license} , {githubLink} , {line1} , {line2} , {line3} . |
auto-header-est2023.headerLayout |
array | ["author", "date", "company", "license", "githubLink"] |
Customize the order and layout of the header sections. Example: ["author", "date", "company", "license", "githubLink"] . |
🤝 Contributing
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
- Code review
- Merge the changes
- Update the documentation
📝 License
This project is licensed under MIT.
👤 Author
- Twitter: @bankkroll_eth
- GitHub: @BankkRoll
This README.md has been generated with ❤️ using quick-readme