Adding mult line comment cmd-shift-/


Is there a community managed keymap file somewhere with bindings you’d expect like ‘cmd-shift-/’

I just want to get my multi-line comment mapped to those keys. It seems like a mapping that should be available by default but it’s not.

Same goes for ‘cmd-shift-up’. I would like to highlight lines this way as sublime does.



For those of us that haven’t used Sublime Text in months … what exactly are you expecting these keymappings to do?


In sublime, ‘cmd-shift-/’ adds a multi-line comment to your selection like so: /* */

In Atom, ‘cmd-/’ is mapped to toggle-line-comments in the Core settings. Just need to figure out how to do the multi-line comment and I’ll be set. Is that already mapped in Core settings? If so I’m not seeing it.

Forget the highlight one. That’s my bad. I was too eager to add that to my topic. I was actually looking for select-up and select-down mapped like so:

  'alt-shift-up': 'core:select-up'
  'alt-shift-down': 'core:select-down'

which I was able to figure.


I’m not sure there is currently support for multi-line commenting in the API. There is a function for single line commenting:

But I haven’t found one for multi-line commenting. Though I could be missing something.

Things I disliked in atom

Well thanks for the response. Yea I found the single line comment too.


Is there a plan on having this feature? Seems pretty basic feature to me and still don’t see it on 1.0.


I don’t know of any plans, no. But anyone is welcome to create a package or submit a PR. I wouldn’t be surprised if there was already a package for it.


There is a way:

command + return; (OSX)


I don’t see how Cmd+Enter would perform a multi-line comment:

In Atom’s default configuration, Cmd+Enter performs editor:newline-below. Perhaps you have a package installed that is adding that feature?


Highlight what you want to comment out and then hit command + return. I don’t know if there is a diff between being on a Mac and something else, but I am on a Mac. It works for me. There are also Atom plugins for commenting if you want more options and to get fancier. Like the ability to uncomment.


What @leedohm is saying is that this feature is not in the core set of Atom functionality. You are able to do it because you have a package installed or a keybind set that adds that ability. You can find out where it’s coming from by going to Settings -> Keybindings and searching for cmd-enter just as in the picture above.


Bump. Waiting for this. Anyone found to do this?


I remember playing around with this some time ago. I guess I could provide some guidance if someone wants to make a PR.