Selection > Split into lines & Edit > Reflow Selection


AFAIK these are complementary commands, right? One takes a long line and makes multiple lines from it, the other takes a set of lines and joins them into a single line.

So why under separate menues?


And speaking of menus, I can’t find an overall document describing the action of each Atom standard menu item.

Is there any such editor doc?


From the Autoflow package README:

Format the current selection to have lines no longer than 80 characters using cmd-alt-q. If nothing is selected, the current paragraph will be reflowed.

So no, they aren’t complementary commands. They both split things across lines, but the Split Into Lines command actually splits the single selection that contains multiple lines into multiple selections of one line each. The other takes a selection (or no selection at all) and reformats the lines to be of a specific length.

And no, there isn’t such a document yet. It is a great idea for a contribution to Atom though.


Ah, for some reason I confused
Selection > Split into lines
Edit > Lines > Join Lines

So in my experience,
Edit > Lines > Join Lines … joins multiple lines into a single line
Edit > Reflow Selection … creates a single line from multiple lines

Is there a better way to do this? TextMate uses
Text > Reformat Text ctl-Q
Text > Unwrap Paragraph ctl-opt-Q
where the shortcuts at least hint at being complementary.

I have to admit I often have to search the web to figure out how atom works.


The intent of the Reflow Selection command is not to simply split one line into multiple lines though. It can do that, but if you have 50 lines of 100 characters each and your preferred line length setting is 80 characters, it will also reformat those 50 lines into 62 lines of 80 characters and one line of 40 characters. That is what the Reflow Selection command is typically used for and why it is called “Reflow” rather than simply “Flow” or “Split”.

So while in one very limited edge case, they can be considered complementary commands … they are not in the main.