Selects and copies entire PHP class methods, including PHPDoc comments, with a keyboard shortcut Ctrl+Alt+M. Ideal for PHP developers who need to manage code quickly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
This extension for Visual Studio Code allows you to automatically select and copy entire PHP class methods, including PHPDoc comments, with a simple keyboard shortcut (Ctrl+Alt+M). It is ideal for PHP developers who need to quickly manage code and maintain consistency in their projects.
Features
Selects and copies complete PHP methods, including PHPDoc, access modifiers (public, private, protected), and the static modifier.
Uses the keyboard shortcut Ctrl+Alt+M (Cmd+Alt+M on Mac) to activate the functionality.
Compatible with methods with or without PHPDoc comments.
Requirements
Visual Studio Code version 1.97.0 or higher.
PHP files open in the editor.
Usage
Open a PHP file in Visual Studio Code.
Place the cursor inside a PHP method (it can be on any line, including the PHPDoc comment or the method body).
Press Ctrl+Alt+M (or Cmd+Alt+M on Mac) to select and copy the entire method to the clipboard.
Installation
Install this extension from the Visual Studio Code Marketplace or from the generated .vsix file.
Once installed, it will be automatically active in PHP files.
Screenshots (Optional)
Here is an example of how Select PHP Method works: