How to comment multiple lines in PhpStorm IDE?

谁说胖子不能爱 提交于 2019-12-09 08:21:30

问题


I use PhpStorm to edit PHP files and configuration files for Apache. How to comment on the selected block and set the symbol comment? I want,for example,

   <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
    </Directory>

to

   #<Directory />
   #    Options FollowSymLinks
   #    AllowOverride None
   #    Order deny,allow
   #    Deny from all
   #</Directory>

回答1:


Select multiple lines and use the Comment with Line Comment (Ctrl+/ in the default keymap on Windows, can be changed in Settings | Keymap).

There is also Comment with Block Comment that works for file types that have special style comment for code blocks (not applicable for .htaccess).




回答2:


in mac :

block some lines of codes
command + /


来源:https://stackoverflow.com/questions/7407481/how-to-comment-multiple-lines-in-phpstorm-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!