Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ shortcut to comment line

There is a way in webstorm to comment or uncomment a specific line or selected block of source code with shortcut? I try to use CTRL + / but doesn't work for me

like image 816
Max Power Avatar asked Aug 01 '17 07:08

Max Power


People also ask

How do you comment fast in IntelliJ?

Comment out a line or selection of code. If you want to temporarily comment out a section of code, you can do so by first selecting the section (remember to use Ctrl + W / Shift + Ctrl + W) and then hitting Ctrl + /. If you want to comment out the current line of code, simply hit Ctrl + / too — no selection needed.

How do you comment and uncomment in IntelliJ?

An alternative way to comment any block of code is to select it, press Alt+Enter and choose Comment selection. The same way works for uncommenting code inside a block comment - set the caret anywhere in the block comment, press Alt+Enter and choose Uncomment.

How do I comment multiple lines in a feature file in IntelliJ?

The default shortcuts are Ctrl+K,C to comment and Ctrl+K,U to uncomment.

How do you comment a line or code in a shortcut?

If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.


1 Answers

References

https://www.jetbrains.com/help/idea/mastering-keyboard-shortcuts.html

Try to use Ctrl+Slash or Ctrl+Shift+Slash for block comment

If this doesn't work show in your Setting -> Keymap -> Search comment

like image 104
Irrech Avatar answered Sep 24 '22 12:09

Irrech