Skip to content
← Back to Community
How to comment out multiple lines of code by placing hash in the beginning of each line
Profile icon
javedbinabbas

How to comment out multiple lines of code by placing hash in the beginning of each line. Similarly I would need to uncomment later. Is there some shortcut for the same ?

Voters
Profile icon
javedbinabbas
Comments
hotnewtop
Profile icon
naumankirmani

thanks

Profile icon
19ecal

Highlight the text you want to comment out and try Ctrl+k+c or Ctrl+k+u
One of them comments, one uncomments, can't remember which though

Profile icon
javedbinabbas

@19ecal: thanks,
Ctrl+k+c ==> comments
Ctrl+k+u ==> uncomments

Profile icon
naumankirmani
Profile icon
javedbinabbas

ok, the solution is to type: "Ctrl + /"