Make Notepad++ your default editor (Windows7)

I previously showed you (without a screencast) how to make NP++ default in XP. Of course, people have successfully done this for W7/Vista as well, but the various tutorials I saw were all a huge pain in the ass. Except for one: a comment on a more-complicated method. I made the following short screencast to demonstrate that method. This one has the advantages of being easy to reverse, easy to do, and not in any way intimidating!

I also have a post on using regular expressions in NP++, if you’re into that sort of thing.

Notepad++ and Regular Expressions

[Note: a lot of readers are finding this post through Google searches, but I have no idea if the contents of this post are fulfilling whatever need that caused those searches. Please leave comments to let me know if this was helpful or not! And, if not, what let me know what you were hoping to find!]

A few years ago I wrote a post on making Notepad++ your default text editor, wherein I expressed my extreme love for this little piece of open source software. To date, I use it for just about everything and, after extensive use in a computational biology lab rotation, I figured I should share one of its most amazing features: Regular Expressions.

I’m not going to take the time to define Regular expressions (“REs” from now on) and will instead send you to Wikipedia. Just know that they are totally badass. In a nutshell, REs let you do really fancy search-and-replace in a text document. Perhaps that doesn’t excite you, but let me give some hypothetical situations in which you may find yourself:

  • You have a file of contact information for everyone you know (say, 1000 people) and want to get just the email addresses so that you can spam everyone.
  • You have a large FASTA file and want to pull out all of the organism names.
  • You want to convert a file from one format to another.
  • You want to combine multiple lines into a single line.
  • You want to separate a line into multiple lines.
  • Other pain-in-the-ass sounding stuff.

Sure, you could manually copy-paste all of those email addresses or organism names, and you could go through and hit the ENTER key to put things on separate lines. OR, you could write a few characters into NP++’s Find & Replace box. I think an example is the best way to make this work.

As a biologist, I’m rather fond of FASTA files. FASTA is simply a way to format DNA or protein sequence data so that people and programs can easily do stuff with that data. The format is:

Continue reading