I have been using Notepad2.exe as a replacement for Notepad.exe. It has advanced editing features and recognizes many languages such as Perl, Python, C#, VB, C++ and so on. It uses the same underlying Scintella text engine as SciTe, my previous default text editor, but has the standard Windows/Office interface.
I originally discovered this from a number of bloggers have been using NotePad2 like Don Park. Just came across Notepad2 again while reading through Jeff Atwood's blog after trying to learn more about one of my more frequent commenters.
I replaced the system version of Notepad by copying the renamed file to c:\windows, c:\windows\system32, and c:\windows\system32\dllcache. The OS needs to be told not to restore the original files.
The author, Flo, is continually updating the file, so every couple weeks I download the latest version, with ever more features.
The nice thing is that the source code is included, but it requires downloading the Scintella text engine files as well. I was able to recompile my own version of Notepad2 very easily with support for Ruby and other user interface enhancements. Isn't that sweet--a text editor you can recompile and customize to suit your needs.