# Copyright Profiles

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/idea/2026.3/llms.txt).

> **TL;DR**
> `File | Settings | Editor | Copyright | Copyright Profiles` for Windows and Linux
>
>
>
> `IntelliJ IDEA | Settings | Editor | Copyright | Copyright Profiles` for macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

> **Note:**
> This page describes controls. For more information about configuring a copyright notice, refer to [Copyright](copyright.html).

## Profiles Toolbar

| Item | Tooltip and Shortcut | Description |
| --- | --- | --- |
| ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) | `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) | Add a new profile. |
| ![the Remove button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg) | `Alt+Delete` (Windows), `⌘ ⌦` (macOS), `⌘ ⌦` (IntelliJ IDEA Classic (macOS)), `⌘ ⌦` (macOS System Shortcuts), `Alt+Delete` (XWin), `Alt+Delete` (GNOME), `Alt+Delete` (KDE), `Alt+Delete` (Emacs), `Alt+Delete` (Sublime Text), `⌘ ⌦` (Sublime Text (macOS)), `Ctrl+R, D` (Visual Studio), `⌘ R, D` (Visual Studio (macOS)), `Alt+Delete` (NetBeans), `Alt+Delete` (Eclipse), `Alt+Delete` (Eclipse (macOS))  | Discard the selected profile. |
| ![the Copy button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.copy.svg) | `Ctrl+D` (Windows), `⌘ D` (macOS), `⌘ D` (IntelliJ IDEA Classic (macOS)), `⌘ D` (macOS System Shortcuts), `Ctrl+D` (XWin), `Ctrl+D` (GNOME), `Ctrl+D` (KDE), `Meta+D` (Emacs), `Ctrl+Shift+D` (Sublime Text), `⌘ ⇧ D` (Sublime Text (macOS)), `Ctrl+D` (Visual Studio), `⌘ D` (Visual Studio (macOS)), `Ctrl+D` (NetBeans), `Ctrl+D` (Eclipse), `Ctrl+D` (Eclipse (macOS)) | Open the Copy Copyright Profile dialog, where you can create a copy of the selected profile. |
| ![the Import file](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.import.svg) | Import | Import a file that contains a copyright notice definition. For more information, refer to [Import a copyright profile](copyright.html#import-copyright-profile).  |

> **Tip:**
> You can perform the same actions using context menus of the profile nodes.

## Copyright Profile Page

Use this page to configure the selected profile: define the copyright notice to be generated and specify the keyword to detect copyright notices in comments.

| Item | Description |
| --- | --- |
| Name | Use this text field to view or edit the name of the selected copyright profile. |
| Share through VCS | Select this checkbox to store the profile in the `.idea` directory and share it with your team through VCS. If you clear the checkbox, IntelliJ IDEA stores the profile on the IDE level and applies it to all projects. |
| Copyright text (may contain Velocity templates) |    Use this text area to view or edit the copyright notice to be generated. A copyright profile can contain an explicit plain text of the copyright notice or its definition through a [Velocity](http://velocity.apache.org/) template.       Currently, the following variables are available in the Velocity context:     \| Name \| Type \| Comment \| \| --- \| --- \| --- \| \| `$today` \| `DateInfo` \| The current date and time. Use it with [DateInfo properties](#dateinfo-properties), for example, `$today.year` inserts the current year. \| \| `$file.fileName` \| `String` \| The name of the currently opened file where the notice is to be generated. \| \| `$file.pathName` \| `String` \| The complete path and name of the currently opened file where the notice is to be generated. \| \| `$file.className` \| `String` \| In Java and Groovy files, the name of the class. In other files, the file name, the same as `$file.fileName`. \| \| `$file.qualifiedClassName` \| `String` \| In Java and Groovy files, the fully qualified name of the class. In other files, the complete path and name of the file, the same as `$file.pathName`. \| \| `$file.lastModified` \| `DateInfo` \| The date and time when the current file was last changed. Use it with [DateInfo properties](#dateinfo-properties), for example, `$file.lastModified.year`. \| \| `$project.name` \| `String` \| The name of the current project. \| \| `$module.name` \| `String` \| The name of the current module. \| \| `$username` \| `String` \| The login name of the current operating system user. \| \| `$originalComment.match(regexp, group, suffix, ignoreValue)` \| `String` \|    The text that `regexp` captures in the `group` group of the existing copyright notice, followed by `suffix`. Use it to keep the original year when you update a notice.     Returns an empty string if there is no existing notice, if `regexp` does not match it, or if the captured text equals `ignoreValue`.     You can omit `ignoreValue`. If you pass only `regexp`, `group` is `1` and no suffix is added.    \|     `$today` and `$file.lastModified` have the following properties and method. The table shows them with `$today`. For the last modification date, use the same names with `$file.lastModified`, for example, `$file.lastModified.year`.     \| Name \| Type \| Comment \| \| --- \| --- \| --- \| \| `$today.year` \| `int` \| The year, for example, `2026`. \| \| `$today.month` \| `int` \| The month (1-12). \| \| `$today.day` \| `int` \| The day of the month (1-31). \| \| `$today.hour` \| `int` \| The hour in the 12-hour format (0-11). \| \| `$today.hour24` \| `int` \| The hour in the 24-hour format (0-23). \| \| `$today.minute` \| `int` \| The minute of the hour (0-59). \| \| `$today.second` \| `int` \| The second of the minute (0-59). \| \| `$today.format(String format)` \| `String` \| The date and time formatted with a [date and time pattern](https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html), for example, `$today.format("yyyy-MM-dd")` returns `2026-10-01`. \|      For example, the following template inserts the current year and the name of the current user:      ```GENERIC Copyright (c) $today.year $username ```     To keep the original year and update only the last one, for example, to change `2022 - 2025` to `2022 - 2026`, use `$originalComment.match`:      ```GENERIC Copyright (c) $originalComment.match("Copyright \(c\) (\d+)", 1, " - ", "$today.year")$today.year $username ```     In a new notice, this template inserts only the current year, for example, `Copyright (c) 2026 jsmith`. When you update an existing notice, it takes the first year from the old notice and adds the current year after it. If the old notice already starts with the current year, `ignoreValue` prevents a range such as `2026 - 2026`. For more information, refer to [Dates in the copyright template](copyright.html#copyright-dates).    |
| Validate | Click this button to check that the Velocity template has been specified correctly. |
| Regexp to detect copyright in comments |    Use this field to type, view, or edit the [regular expression](regular-expressions.html) that will be used to find copyright notices in comments.       Note that this regular expression should match the copyright notice specified above. Otherwise instead of  [updating](null) copyright notices, IntelliJ IDEA will insert new ones.     |
| Allow replacing copyright if old copyright matches |     Optionally, specify a regular expression that limits which existing copyright notices IntelliJ IDEA updates. IntelliJ IDEA replaces a detected notice only if this expression matches some part of its text. The expression is case-sensitive. If you leave the field empty, IntelliJ IDEA replaces all detected notices.     For example, to update notices of your company and leave the notices in third-party code unchanged, specify the company name: `Acme Corp`.       Note the difference between Regexp to detect copyright in comments and Allow replacing copyright if old copyright matches. The first setting finds copyright notices, and the second one decides whether a found copyright notice is updated.     |

## How it works

* [Copyright](copyright.html)

## See also

### Concepts

[Scopes and file colors](configuring-scopes-and-file-colors.html)

### Procedures

[Configure copyright profiles](copyright.html)

