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.
- 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.
- Visual Studio Code version 1.97.0 or higher.
- PHP files open in the editor.
- 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.
- 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.
Here is an example of how Select PHP Method works:
If you want to contribute to the development of this extension, visit our GitHub repository: https://github.com/betoxx/select-php-method/.
This extension is licensed under the MIT License.