How to add a space in front of every line in notepad

ppp picture ppp · Dec 29, 2014 · Viewed 22.2k times · Source

I have a list of data in notepad and want to insert a space in the beginning of each line.

Example

This is how it looks in the notepad now

Number

"123"

"123"

"124"

"126"

"147"

I want it to look like below

    Number

    "123"

    "123"

    "124"

    "126"

    "147"

I am sure there is some short cut. Please advice.

Answer

mbomb007 picture mbomb007 · Dec 31, 2014

Open your file in Notepad++

Press Ctrl+H to open the Replace window.

Change the "Search Mode" to Regular expression.

In the "Find what" box, type (\n|^)

In the "Replace with" box, type \1     (with your spaces or tab at the end)

Then click "Replace All"

Note: If you want tabs instead of spaces, a tab character can be typed with Alt+09