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.

有帮助吗?

解决方案

No, it's not possible. But you can add your feature request on JetBrains tracker: http://youtrack.jetbrains.com/issues/WI#newissue=yes

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top