Shortcut to get PhpStorm to wrap or unwrap the current line with /* */ comment tags

TECHNOLOGY

Posted on 2017-05-23 23:14:42


There are 2 standard actions for working with comments:

  • Comment with Line Comment Ctrl + /
  • Comment with Block Comment Ctrl + Shift + /

CSS does not have single line comments, only block comments, but Comment with Line Comment works just fine: it comments and uncomments current line (or selected lines) by applying or removing comment for each line individually.

Block comment works with selections only and applies single comment to whole selection.

P.S.
Those shortcuts are for Windows using Default keymap. For other OS / keymaps check it in Settings (Preferences on Mac) | Appearance & Behaviour | Keymap (that's for PhpStpm v8.0.2, for 8.0.1 and older the settings path is slightly different)