NotePad++
Replace Space with Carriage Return
Written by Philip
Replace Space with Carriage Return
Website / Blog : www.how-to-code.com
Contact : This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Ok So, you've got your text editor something like NotePad++ and you wish to seperate your code out to look neater, well you'll probably have to seperate your code using Carriage Return. This can be carried out in the Replace window of your text editor. To do this do the following;
- Find your replace window, usually shortcut key is Ctrl + F, then find the replace tab (NotePad++)
- Select to Find the characters you wish to replace ie. />, or space (just use space bar to get this)
- in Replace with type \n which is Carriage Return.
- Switch Regular Expression mode on, this will be a check box or radio button.
- Then do your Find and Replace as normal.
So to sum up the main things are /n for the Carriage Return, and make sure you switch Regular Expressions on within your replace window.
NotePad++ Replace Window. Notice the search mode is set to Regular Expressions.

NotePad++