Monday, November 23, 2009

metapad

Anyone who spends any amount of time using a computer discovers that a good text editor can be your best friend. I even found that to be the case back in my brief stint using a Mac/Amiga setup at work in the mid-'90s. Even further back, back when the world was young, I loved a DOS editor called PC Write. Not only could this thing control printer formatting and edit files of almost any size, but it could actually find-and-replace things like tabs and newline characters. That editor was the first piece of shareware that I ever paid to register... it was that good. It even had a built-in thesaurus!

I hung on to PC-Write for several years even after I got into the Windows universe, but eventually I realized that it was just going to be better to go with something that was integrated into Windows... for example, you couldn't easily copy and paste to and from the Windows clipboard from PC-Write. I needed to start using a Windows program. Windows Notepad is handy mainly because it is a true text editor (in contrast with Wordpad, which is liable to insert who-knows-what control characters into your document) and because it's pretty much always present on any Windows machine (and basically always the same, although I haven't used it on Windows 7 yet). But if you want to do anything other than typing characters and some light find and replace, Windows Notepad just doesn't cut it.

So we techies tend to find our own favorite text editors. If you don't have one yet, why not give my favorite a try: metapad! Metapad does not have an installer; you download it, unzip it, and click the icon to run it... I typically create a "metapad" folder in the C:\Program Files directory and unzip it there, then I create a shortcut to the executable in the Program Files folder and add C:\Program Files to the XP environment variables (right-click My Computer, choose "Properties", "Advanced" tab, "Environment Variables" button, add "C:\Program Files" to the end of the Path's "Variable Value") so I can just type "metapad" into the start/run dialog and get on the way to editing right away. I also set it as the default editor for .txt files, and sometimes some other file types as well. But because no installation is required, you can carry it around in your pocket on a flash drive as well (and I do). I plug in the flash drive and click the icon and I'm in business.

Metapad can do everything that Windows Notepad can do, but it takes several of those things to the next level. In a PC-Write-like feature, it is able to find and replace newline characters and tabs; I use that frequently when cleaning up snippets of code or when editing csv exports from MS Excel or other sources. There is an option to turn hyperlinks within the file into live links, so you can click directly on them and open a browser to the site. Word Wrap can be on or off, just like Notepad, so you can display files just as they actually exist or you can make sure every character is visible. You can mark a block of text and change it to all-uppercase, all-lowercase, "title case" (every word capitalized), "sentence case" (first word of each sentence capitalized), or "invert" the case of the marked block (every capital letter switched to lower-case and vice-versa). You can jump directly to a line number, which can come in very useful when editing code. And check this out: there is no file size limit! If you load a file that is larger than the memory of the computer can hold, metapad uses some clever paging to load as much of the file at once as it can, and it loads the rest of it as needed. Good stuff!

There are editors out there with a billion functions in them, ten of which you will use and the rest of which you will immediately forget that they even exist, or if you remember that they exist, you'll immediately forget how they work. Metapad has a fairly small number of functions, but the ones that are there are easy to use and worth discovering. There are a few functions that I haven't mentioned here (external viewer support, commit word wrap, support of text files from different platforms, etc.) but the feature set remains very basic... just what you need for the task at hand, and nothing more. It's like the perfect little Swiss army knife, the one with just the blade, the can opener, and the nail file, but not the toothpick/tweezers/magnifying glass/extensible fishing pole. It has just the feature set you need with no fluff. Give it a try!

1 comment:

  1. Thanks for the great, thorough writeup MJ.

    In case you hadn't noticed, after many years I have released a new version of Metapad. Version 3.6 has a brand new feature that I think you, as a thumb drive user, will particularly appreciate called portability mode. When in this mode, all program settings will persist to a local file (e.g., on the thumb drive) instead of the host computer's Windows registry (and you can even migrate your settings from the registry into an INI file by running "metapad /m").

    I'd love to hear what you think about the new release.

    -AlexD

    ReplyDelete