Find and Replace with newline


Is there a way to use a newline as a replacement character? Let’s say I have the following text:

Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware

And I wanted it to be:


How I would normally do that is replace each , with newline, but Atom does not allow me to type one as far as I can tell. Some software (such as TextMate or TextEdit) will allow you to use opt+return to make a newline, so that might be an interface for it.


If you turn on Regular Expression mode with the .* button on the right, you can type \n as the replacement string to replace the commas. You should also replace the trailing space after the comma at the same time to get exactly what you want.


Very nice! Thanks for the support.


Worked for me, thank you!


Perfect, thank you.


thanks! worked great


Is there a place to file a bug where finding and replacing , with ,\n in regex mode locks atom up on very large json blobs?
I’d like to open an issue.


You can put your issue over here,
It will take time to resolve it based on the severity of the issue.


Very good, help me to save my work


Thank you!


Is there a way to search for line endings?


Try using a regular expression:


Thank you…