What does `editor:split-selections-into-lines` do?


Can someone tell me what editor:split-selections-into-lines does?


From the source:

Split multi-line selections into one selection per line.
Operates on all selections. This method breaks apart all multi-line
selections to create multiple single-line selections that cumulatively cover
the same original area.


Yeah I read that. I tried multiple situation with Atom 1.5.0-beta3 on Windows, but the command doesn’t do anything.

Can someone post an use-case and a working screengrab…


Let’s say you have a longer block of text/code and want to comment it out:

Select text -> editor:split-selections-into-lines -> left key. Now you have one cursor at the beginning of each line.

This is purely for demonstration, because a smart Atom user uses editor:toggle-line-comments. I just couldn’t think of another example because I rarely use this feature.

How can I use Columns?

Ah, now I get it. It’s not a full range selection over multiple lines, but multiple selections per line. Thank you @deprint


I’m late to the party, but this is how I think of it: it converts one or more range selections into many single-line selections.