Forums

Key bindings to comment line(s)

In SublimeText2 you can press ctrl+/, and all lines, which are fully or partially selected become commented (with # at the beginning line, but after indentation spaces). If all all of these lines are already commented, this command will uncomment selected lines.

It's very useful when you debug your code and need to enable or disable large blocks of code.

Thanks for the suggestion, that sounds useful. I've added it to our to-do list with an upvote on your behalf.

+1

I've upvoted the ticket for you, a2j

THANK! YOU!!

BTW it works now -- not quite sure when we implemented it -- sometime after 2012, of course :-)

Doesn't work here How to comment multiple lines with Mac? Cheers

On a Mac, it's Command-/. You can see a list of keyboard shortcuts in the editor if you click the "Keyboard shortcuts" link at the top of the page.

Wonderful to find this shortcut, thanks!!