Scott Hanselman

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

April 19, '07 Comments [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. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Thursday, April 19, 2007 11:02:37 PM UTC
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.

Cheers,

Andrew.
Thursday, April 19, 2007 11:06:58 PM UTC
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.

/Jesper
Thursday, April 19, 2007 11:26:23 PM UTC

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

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

http://brennan.offwhite.net/blog/2007/04/19/notepad2-update-released/

Perhaps I should create another installer for the Ruby-enabled version as well.
Friday, April 20, 2007 7:27:49 AM UTC
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...

Graham
Friday, April 20, 2007 7:47:06 AM UTC
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?
Dmitry.
Friday, April 20, 2007 8:38:29 AM UTC
Dmitry, sorry, I put and older bad build up, it's fixed now.
Friday, April 20, 2007 8:50:41 AM UTC
It works, thanks a lot.
Dmitry.
Friday, April 20, 2007 1:00:48 PM UTC
So that's why you asked that C++ question during the chat yesterday... Nice addition to Notepad2!
Friday, April 20, 2007 2:15:17 PM UTC
The Notepad2 src download appears to be missing the scintilla.h header file. Was it part of the src package you downloaded Scott?
Coleman
Friday, April 20, 2007 5:33:32 PM UTC
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!
Friday, April 20, 2007 5:35:55 PM UTC
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
Friday, April 20, 2007 6:15:23 PM UTC
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.
Caesar Whiddick
Friday, April 20, 2007 8:04:38 PM UTC
Scott,

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.
Coleman
Friday, April 20, 2007 8:25:00 PM UTC
Coleman - You need to open up Keywords.cxx and change the #define for LINK_LEXER to this:

#define LINK_LEXER(lexer) void(0)
Saturday, April 21, 2007 12:08:37 PM UTC
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.
Sunny
Sunday, May 20, 2007 8:08:14 PM UTC
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 :)
James
Friday, May 25, 2007 10:53:14 AM UTC
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

~rd
Comments are closed.

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