Friday, June 20, 2008

Notepad++ - Replace a Pattern with Line Break

I can replace a pattern with line break much easy with latest jEdit; however, I found notepad++ is more lightweight and powerful. So, I intend to use notepad++.

Notepad++ has so many options, configurations and tools. I intend to it can do many jobs.
However, it takes me a while for how to replace a pattern with line break. The tricky part is how to put line break into "Replace with". I tried "\n", but not translate to line break. Also, tried "crtl+enter" key. Still no.

After, I look at http://forums.whirlpool.net.au/forum-replies-archive.cfm/911631.html, then it give me some hint.

I need to turn on "End of Line" in the "View" menu, then I copy "LF" into "Replace With".
Then a pattern can be replaced with real line break.

My next goal is to replace HomeSite with Notepad++.

3 comments:

6smail said...

Thx for the hint, but there is a better solution I think at:
http://ryancannon.com/2007/03/28/45-minutes

I also give my solution at :
idontfixyourpc.blogspot.com

Thx :)

Viper said...

actually the solution in notepad++ is much simpler. At least in v5.3.1

In the lower left hand corner of the Replace box, you'll see a section called "Search Mode". Just select the "Extended (\n, \r, \t, \0, \x...)" choice and you can enter in \r as the replace variable and it will put the line break in.

Mariano Enrique Cifre said...

You rock, man! Thanks for the info!