|
1 | | -# phpstorm-function-comments |
| 1 | +# Function Comments |
2 | 2 |
|
3 | 3 |  |
4 | 4 | [](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) |
5 | 5 | [](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) |
6 | 6 |
|
7 | | -## Template ToDo list |
8 | | -- [x] Create a new [IntelliJ Platform Plugin Template][template] project. |
9 | | -- [ ] Get familiar with the [template documentation][template]. |
10 | | -- [ ] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin). |
11 | | -- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description]) |
12 | | -- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate). |
13 | | -- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time. |
14 | | -- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace. |
15 | | -- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables). |
16 | | -- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate). |
17 | | -- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes. |
18 | | -- [ ] Configure the [CODECOV_TOKEN](https://docs.codecov.com/docs/quick-start) secret for automated test coverage reports on PRs |
19 | | - |
20 | 7 | <!-- Plugin description --> |
21 | | -This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have. |
| 8 | +A PhpStorm plugin that lets you quickly comment or uncomment entire PHP functions with a single keyboard shortcut. |
| 9 | + |
| 10 | +**Features:** |
| 11 | +- Comment/uncomment complete functions including PHP 8+ attributes |
| 12 | +- Single-line (`//`) and multi-line (`/* */`) comment styles |
| 13 | +- Toggle behavior: automatically detects if function is commented and performs the opposite action |
| 14 | +- Smart handling of nested block comments (falls back to single-line style when necessary) |
| 15 | +- Available via keyboard shortcuts and editor context menu |
| 16 | + |
| 17 | +**Known Limitations:** |
| 18 | +- No proper support for anonymous functions or closures |
| 19 | + |
| 20 | +**Roadmap:** |
| 21 | +- Support for anonymous functions and closures |
| 22 | + |
| 23 | + |
| 24 | +## Usage |
| 25 | + |
| 26 | +Place your cursor anywhere inside a PHP function and use: |
22 | 27 |
|
23 | | -This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process. |
| 28 | +| Action | Shortcut | Description | |
| 29 | +|--------|----------|-------------| |
| 30 | +| Comment Function (Single-Line) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>/</kbd> | Comments each line with `//` | |
| 31 | +| Comment Function (Multi-Line) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>/</kbd> | Wraps function in `/* */` | |
24 | 32 |
|
25 | | -To keep everything working, do not remove `<!-- ... -->` sections. |
| 33 | + |
| 34 | +Both actions are also available via right-click menu under **Function Comments**. |
| 35 | + |
| 36 | +To uncomment, use the same shortcut on an already-commented function. |
26 | 37 | <!-- Plugin description end --> |
27 | 38 |
|
28 | 39 | ## Installation |
29 | 40 |
|
30 | 41 | - Using the IDE built-in plugin system: |
31 | 42 |
|
32 | | - <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "phpstorm-function-comments"</kbd> > |
| 43 | + <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Function Comments"</kbd> > |
33 | 44 | <kbd>Install</kbd> |
34 | 45 |
|
35 | | -- Using JetBrains Marketplace: |
36 | | - |
37 | | - Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running. |
38 | | - |
39 | | - You can also download the [latest release](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID/versions) from JetBrains Marketplace and install it manually using |
40 | | - <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd> |
41 | | - |
42 | 46 | - Manually: |
43 | 47 |
|
44 | 48 | Download the [latest release](https://github.com/luminarix/phpstorm-function-comments/releases/latest) and install it manually using |
45 | 49 | <kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd> |
46 | 50 |
|
47 | | - |
48 | 51 | --- |
49 | 52 | Plugin based on the [IntelliJ Platform Plugin Template][template]. |
50 | 53 |
|
51 | 54 | [template]: https://github.com/JetBrains/intellij-platform-plugin-template |
52 | | -[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation |
|
0 commit comments