Commenting out code blocks in Atom

Atom does not have a specific comment-block function, but if you select more rows and then use the normal ctrl-/ (Windows or Linux) cmd-/ (Mac), it will comment all the lines.


Also, there are packages:

  • Comment package for atom (https://atom.io/packages/comment)
  • Block-comment-lines https://atom.io/packages/block-comment-lines
  • Sublime Block Comments

Command + / or Ctrl + shift + 7 doesn't work for me (debian + colombian keyboard). In my case I changed the Atom keymap.cson file adding the following:

'.editor':
  'ctrl-7': 'editor:toggle-line-comments'

and now it works!


According to this, cmd + / should do it.

And for Windows and Linux, it is ctrl + /.

Tags:

Atom Editor