Danny Iachini’s Weblog

My Nerdy Stuff

Notepad++ Rocks My Socks

If you enjoy being super productive, I strongly suggest you check out Notepad++ (download).  This program is absolutely amazing.  It’s a free text editor (like Notepad or Wordpad that each come by default in XP) which has so much functionality and extendibility.  It is especially useful for programming, but I use it for editing regular text files as well.

The first thing that Notepad++ has which should be required in every program these days is allowing multiple files to open simultaneously via tabs.  Each of the main programs I use (Firefox, Notepad++, and Pidgin) have tabbed windows and it really makes life a whole lot easier for a multi-tasker.

Next up, the easy-to-record easy-to-use macros in this program are rather solid.  Let’s say you want to separate every single line in a document with an extra line: all you have to do is press the magic little “Start Recording” button, hit the end key, hit return, hit the down key, and then press the “Stop Recording” button.  Now whenever you press the “Playback” button, it will go to the end of that line, add a new-line character, and go down to the next line.  But it gets better!  You can “Run a macro multiple times”, specifying either the number of times to run it or to run it to the end of the file.  How cool is that?!

An amazing capability which I saw was there previously, but didn’t have a reason to use until just recently is the use of regular expressions in the find and replace.  I always have a difficult time defining what a regular expression is, but it’s basically a way to match patterns.  I think the best way to describe them is to just use an example:

Let’s say you have a file which has people’s names in the “LastName, FirstName” format, and you want to replace it with a “FirstName LastName” format instead.  You can open up a find and replace, finding “([A-Z][a-z]*), (.*)” (without the quotes) and replacing with  “\2 \1” (without the quotes).  The find there is a regular expression:  inside square brackets [ ], you can put a range or set of values, so [A-Z] finds a capital letter between A and Z inclusively; the * after the [a-z] is called the Kleene Star, and what it means is that it will match an element in that set 0 or more times (similarly, a Kleene Plus would match something 1 or more times); the “, ” will match exactly a comma followed by a space; and finally, the “.*” will match the remainder of the line (the . is the wildcard character, so it will greedily find the rest of the line’s wild characters).  The replace uses the variables stored from inside the parentheses: the first set of parentheses “([A-Z][a-z]*)” gets stored in “\1” and the second set “(.*)” gets stored in “\2”; so by simply putting “\2 \1” in the replace, it puts the first name first, and the last name second.  Pretty cool stuff, huh?

Also, the syntax high-lighting is phenomenal in Notepad++.  With tons of programming languages’ syntax already built in and more available to install yourself, you can use Notepad++ to program in just about any language imaginable!  It’s pretty awesome.

And finally, there are three great additional views available:  you can view FTP folders (allowing you to modify files through FTP with seamless downloading and uploading (you just open it like it’s on your computer.. and then every time you save, it gets re-uploaded)); the Light Explorer lets you browse your files without having to have a Microsoft Explorer window open (very handy when you’re working on multiple files in the same folder; and you can view a console dialog, having your very own command prompt built-in (for a command-line compiler for example).

All-in-all – Notepad++ is a really useful program, especially if you’re doing any sort of programming.  If you give it a shot, you won’t be disappointed!


June 4, 2008 - Posted by | General Stuff


  1. thanks for this very handy, i’m finding regex a upwards struggle but notepad++ is amazing

    Comment by vikki | November 29, 2010

  2. Notepad++ tops Dreamweaver at $300 bucks a pop.

    For a PHP IDE, It’s totally awesome and doesn’t rape your codes formatting since there’s no visual design element.

    Also I hear you can get X-Debug to debug PHP with it, however I haven’t spent the time to find out how.

    Other than that I’m still trying to find the correct expression to replace the ID in a MySQL Insert .SQL file. I need 2 figure out wildcards. Thanks for the post.

    Comment by ElectricPrism | December 23, 2010

  3. I totally agree. I do all scripting in Notepad++

    Comment by Alan | June 10, 2011

  4. Thanks bud!

    Comment by James | October 18, 2011

  5. Hi my friend! I wish to say that this article is awesome, great
    written and come with approximately all important infos.
    I would like to peer extra posts like this .

    Comment by zoloft and premature birth | July 28, 2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: