My quick review: Sony PRS-T2 reader ►

◄ Site Update: Time for a redesign

2013-02-16 📌 Yet another post about text editors: Notepad++ got PCRE, got good

Tags 🏷 All 🏷 Tech 🏷 Personal

My timing's impeccable: a couple of months after I did my last trawl for free Windows text editors that have multi-line regular expression functionality, Notepad++ got it, about a year ago.

Whilst there are ways to work around search-and-replace that can't handle line ending characters, they're always a kludge, so this is very welcome. And it's Perl compatible syntax, which is widely implemented and familiar. A pretty exhaustive breakdown of the differences between major variants compiled by the author of EditPad can be found at:

Although I found Programmer's Notepad back then, most code I've needed to work with recently has been SQL, vbscript or batch files, so the concept of getting to know it with HTML/PHP/CSS/JS didn't get far. Not that PN2 would be in any way a bad choice for any of those uses from what I've seen, but I was going to set it aside for the web stuff and use it concurrently with NoteTab for comparison purposes. Then things got busier, and NoteTab's been a habit for well over ten years by this point. It hasn't changed much in all that time, but I know it like few other applications. Another consideration, I suppose, is that PN2 is maintained as a hobby project by a guy who's quite reasonably got other life priorities right now, and there's value to standardising on software with a big community of users that you can point anyone towards — Notepad++ is extremely popular and on PortableApps for instance.

So I can get behind the idea of going cold turkey with NoteTab and moving over to Notepad++ at home and at work. When I moved to Windows 7 setting up another editor to replace Notepad directly wasn't something I got around to, and bearing in mind that Windows treats notepad.exe as a protected system file it's a slightly different process these days. You can either unlock controls on various files and replace them (which is likely to break with system updates) or take advantage of a Windows debugging feature as described here.

Copy the below code to C:\Program Files\Notepad++\launcher.vbs

Create a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\" called "notepad.exe". Create a string value inside called "Debugger" with the value:

And that should do you. And yes, Windows is a nightmarishly complex mess of hacks and compatbility layers by now, as readers of Raymond Chen or indeed anyone who's used it for any length of time will know... this particular one has been around for ages and McAfee was seeing this feature for debugging used to deliver virus/trojan payloads a long time ago.

Notepad++ doesn't natively do a few things that I take for granted in NoteTab, such as the ability to sort lines without workarounds like copying the data over to Excel, but it has a plugin architecture and lots of them to look through... I'm confident I'll find whatever I'm looking for. IIRC, that example one is in the TextFX plugin.

💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.