Ask coding questions

← Back to all posts
How to comment out multiple lines of code by placing hash in the beginning of each line
javedbinabbas (0)

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 ?

Comments
hotnewtop
19ecal (228)

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

javedbinabbas (0)

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

javedbinabbas (0)

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