Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A keyboard shortcut to comment/uncomment the select text in Android Studio

How do I comment out several lines of text selected in the IDE with a control key combination?

I thought that Ctrl + Alt + C was the correct sequence, but that's not working.

like image 425
Marcus Noon Avatar asked Sep 04 '14 08:09

Marcus Noon


People also ask

How do you uncomment a keyboard ShortCut?

The "Uncomment" command corresponds to the Uncomment entry in the Advanced submenu of the Edit Menu . It may be called by using the keyboard shortcut "Ctrl+Shift+K".

How do you ShortCut and uncomment a comment?

Use the keys Ctrl K , C to comment out the line and Ctrl K , U to uncomment the line.

How do you uncomment a comment?

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.


1 Answers

To comment/uncomment one line, use: Ctrl + /.

To comment/uncomment a block, use: Ctrl + Shift + /.

like image 173
Marcus Noon Avatar answered Sep 17 '22 09:09

Marcus Noon