Skip to content

luminarix/phpstorm-function-comments

Repository files navigation

Function Comments

Build Version Downloads

A PhpStorm plugin that lets you quickly comment or uncomment entire PHP functions with a single keyboard shortcut.

Features:

  • Comment/uncomment complete functions including PHP 8+ attributes
  • Single-line (//) and multi-line (/* */) comment styles
  • Toggle behavior: automatically detects if function is commented and performs the opposite action
  • Smart handling of nested block comments (falls back to single-line style when necessary)
  • Available via keyboard shortcuts and editor context menu

Known Limitations:

  • No proper support for anonymous functions or closures

Roadmap:

  • Support for anonymous functions and closures

Usage

Place your cursor anywhere inside a PHP function and use:

Action Shortcut Description
Comment Function (Single-Line) Ctrl+Alt+/ Comments each line with //
Comment Function (Multi-Line) Ctrl+Alt+Shift+/ Wraps function in /* */

Both actions are also available via right-click menu under Function Comments.

To uncomment, use the same shortcut on an already-commented function.

Installation

  • Using the IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "Function Comments" > Install

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages