Huge Discounts on Mobiles, Books, Cameras, Computers etc: @Flipkart

Tuesday, December 09, 2008

Replace Notepad with Notepad2

Notepad is one of the few tools that have always been a part of Windows, but in the process of updating and improving the OS, were left behind and have not evolved at all. Microsoft views Notepad as a final product and does not plan to make any changes or additions to it in the foreseeable future.

The original Notepad shipped with Windows is probably the handiest program of all times, small, fast, without frills! But Notepad has many disadvantages that are clear to any person using it on a daily basis. That's why many programmers and 3rd-party software developers looked into developing better tools that will still be as simple to use as Notepad, yet offer additional features and capabilities that were left out of the original Notepad. For example, notepad hangs if you try to open a large file (even if just a few MBs). Also there is no option to view line numbers or to go to a line. Again notepad can undo only the last action and neither can it detect external file changes.

Even if you have many complex IDEs and advanced word editors installed on your machine, we still use notepad at least a few times daily, probably to copy and paste the clipboard content or quickly note down something or even to open one or two files in a rush instead of waiting for the bulky IDE to load. I have EditPlus and Programmers Notepad installed on my machine, but still I use notepad for something or the other.

I considered multiple options, which finally boiled down to
1) Programmers Notepad
2) Notepad ++
3) TinyEdit
4) Notepad2

And the winner is, well the first position is shared between two, Notepad2 as a notepad replacement and Programmers Notepad for programming uses. Notepad2 doesn't have any installer. Just download and unzip and you are ready to go. See Notepad2 in action below. You can see the line numbers, current line highlighting, wrap & long line indicator etc.

To replace windows notepad, do the following:
* Backup your original c:\windows\Notepad.exe (say copy to old_notepad.exe).
* Rename Notepad2.exe to Notepad.exe in above unzipped folder
* Copy the above notepad.exe into 4 directories (in given order) :
1. c:\windows\servicepackfiles\i386 or C:\WINDOWS\i386
2. c:\windows\system32\dllcache
3. c:\windows\system32
4. c:\windows

If when you replace notepad.exe, a "Windows File Protection" message box appears, click Cancel. Now wherever notepad used to come, you get notepad2 instead. Notepad2 is fast and light (260KB versus 67KB windows notepad) and very much worth the extra 200 KB.

You can download it from here:

I did like Notepad ++ a lot too, because:
1) Comes with an autoupdater (no need to download and install again when a new version is released)
2) Supports code folding and syntax highlighting
3) Has plugin support and MDI (multiple tabs)
4) Can replace the default notepad
5) Supports USB mode (all settings stored in app folder)
6) Auto-completion and explorer context menu
7) Love the function list in java files
and a lot more....

My favorite NPP (Notepad Plus) plugins are:
1) Function List (No Unicode Support)
2) Hex Editor
3) Search In Files (No Unicode Support)
4) Spell Checker

Download NPP from here:

Here is the list of complete plugins:

To install the plugins, just unzip to C:\Program Files\Notepad++\plugins

Since Function List and Search In Files doesn't work in the new versions because of no unicode support, I had to ditch Notepad++ and select Programmers Notepad (PN) instead.

Advantages of Programmers Notepad are:
# Code Folding/Outlining
# Docking tool windows
# Excellent external tool support with user-configurable output matching - click on errors and warnings to jump right to the place in the file where they were generated (compile and run from PN itself)
# File association manager
# In-file method/definition navigation (using Ctags)
# No limit on file size (although large files may take a while to load)
# Projects and Project Groups with multi-level folders and file system mirroring
# Support for unicode files
# Support for windows, unix and macintosh file formats
# Syntax highlighting for many languages through “schemes”.
# Tabbed MDI interface

But I wish PN has an auto updater too :(

You can download it from here:

You can map new file types to existing schemas for enabling syntax highlighting as shown below. Now I can create/edit JSPs with PN.

This is the file type manager in PN.

PN in action. See the methods and member variables listed nicely, excellent!

You can also notice that I compiled the java program from inside PN. Click on the error and it will take you to that line in source file.

No comments:

Post a Comment