Scott Hanselman

New Release of Notepad2 - Updated (again) with Ruby Support

April 20, 2007 Comment on this post [18] Posted in Programming | Tools
Sponsored By

I'm a big fan of Notepad2. I have used a ton of text editors, but I keep coming back to Notepad2. Partially because it's one better than Notepad, but mostly just because it feels very natural. Notepad++ is nice, but still, I'm drawn to Notepad2.

After nearly three years of silence, Florian Balmer of Flo's Freeware has updated Notepad2! You can get the latest version here directly from Flo, as well as the C++ source.

There's some cool changes in this version, including the removal of settings from the Registry. They're stored in a .ini file now, which makes Notepad2 more appropriate as a Portable App.

Here's a few of the changes that I'm enjoying (full list of changes here):

  • "Insert HTML/XML Tag" helper tool (Alt+X)
  • Rectangular selection (Alt+Mouse)
  • BSD License for Notepad2 and source code (see License.txt)
  • Multiline find and replace
  • Find and replace dialogs are now modeless
  • File change notification (optional)
  • "Duplicate Selection" command (Alt+D)

And dozens and dozens more small improvements. Let's all congratulate Flo on his triumphant return!

Unfortunately, Ruby as a syntax highlighting scheme still isn't included in this distribution, and while I want the new Notepad2, I can't give up the Ruby support added before by Wesner. So, I took the source of the New Notepad2 used Beyond Compare and Rubyified it, again. If you want to build it yourself, you have to get the source for Scintilla first, then modify it to change some Lexer linking stuff (see the Notepad2 readme.txt).

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
April 20, 2007 3:02
Hi Scott,

Any reason you prefer Notepad2 over SciTE, the Scintilla editor?

BTW, I noticed you're a big PowerShell fan. Are you using Vista yet? Because if so, you may be interested in my PowerShell Sidebar gadget.


April 20, 2007 3:06
Thanks for the tip. Will definitely check Notepad2 out. Thanks for adding the ruby support. However, it will probably have a hard time beating the new kid on the block: E-texteditor. It's just so darn intuitive to use.

April 20, 2007 3:26

Jesper - I don't know, kind of hard to beat one of the biggest aspects of Notepad2: it's free and open-source.

April 20, 2007 6:59
Thanks for the post. I have published an installer with the registry setting to add shell integration. You can get to it here...

Perhaps I should create another installer for the Ruby-enabled version as well.
April 20, 2007 11:27
Hi Scott

I've got to second Jesper's comment above. I've worked my way through all of the usual suspects all the while lusting after TextMate on my friends' macs. And then along came e-texteditor. It is currently in a beta phase but has full TextMate bundle support so already has a whole community and history pre-installed.

As for free and open source Jason, you're right it is not. If that is important then as you say, Notepad 2 is for you. If you can stretch to the princely sum of $30 though you'll realise that the text-editor bar has definitely been raised on Windows.

I've linked to some stuff around e and console as a rails environment...

April 20, 2007 11:47
Hi, Scott.
I don`t understand where I make a mistake. I download your edited Notepad2 with Ruby syntax highlightning, run it, open my ruby sources and don`t see the highlight feature. Have you any suggestions?
April 20, 2007 12:38
Dmitry, sorry, I put and older bad build up, it's fixed now.
April 20, 2007 12:50
It works, thanks a lot.
April 20, 2007 17:00
So that's why you asked that C++ question during the chat yesterday... Nice addition to Notepad2!
April 20, 2007 18:15
The Notepad2 src download appears to be missing the scintilla.h header file. Was it part of the src package you downloaded Scott?
April 20, 2007 21:33
Since I learned about Notepad2 from your blog, I've been using it along with Notepad++. Another amazing text editor is jEdit. Yeah, it's a Java application, but give it a try. They have done a quite an amazing job.

Oh BTW, they just released Ubuntu 7.04. I installed it and I'm very impressed. I got a laptop that has Vista and Ubuntu 7 now!
April 20, 2007 21:35
Coleman - If you want to rebuild this, you'll need to do a few things.

One, download Scintilla (I didn't redist it).
Two, change some headers (a lexer define) per Flo's readme.
Three, add the Ruby lexer to the project
April 20, 2007 22:15
Thanks for the update, Scott. Another commenter mentioned Notepad++, which I currently use, too. Perhaps you've used both Notepad2 and Notepad++. If so, I'd be interested in why you prefer Notepad2. Cheers.
April 21, 2007 0:04

Thanks. I didn't RTFM, clearly. Once I downloaded Scintilla, the main Notepad2 app did compile, but failed to link. When I get some time, I'll look into it further. I'm interested in expanding the HTML tag insertion.
April 21, 2007 0:25
Coleman - You need to open up Keywords.cxx and change the #define for LINK_LEXER to this:

#define LINK_LEXER(lexer) void(0)
April 21, 2007 16:08
The new version is not so impressive after nearly three years of silence.
I stick with Notepad++ which is more featured swiss-knife to edit my ruby files.
May 21, 2007 0:08
There are some pretty bad bugs in Notepad2 version 2.0.15. You should download the latest - 2.0.16 - and add your changes for Ruby to that. There is a reason flo updated it so quickly :)
May 25, 2007 14:53
hi all,

well is anybody here able to compile ruby files using any of the editors mentioned above ???

I haven't succeeded and if u drop me a line


Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.