No, it's not possible. But you can add your feature request on JetBrains tracker: http://youtrack.jetbrains.com/issues/WI#newissue=yes
configure right click mouse for code comments in phpstorm?
-
20-06-2023 - |
Frage
Is it possible to configure comments code directly when right click mouse? For example, I select some code, then right click, then I can choose html comment, php comment, multiline comment.
Lösung
Andere Tipps
Yes, all menus in PhpStorm are fully customisable.
Open Settings|Menus and Toolbars
, then expand Editor popup menu
, select any suitable existing element and use Add After
to add one of Main Menu|Code|Comment ...
actions.
This will make them appear in "right click menu" within editors. Action may be disabled depending on whether it is defined for the language at caret position.
Note, that built-in actions will automatically choose comment style depending on context.
If your intent is to specifically surround the selection with i.e. html comment you'll need to take additional steps - create a custom template for Surround with
action, recording a Macro
that invokes it on selection and adding that macro to the menu as described above.