This post describes five of my favorite, yet perhaps nonobvious, power tools within Metapad. They are: Portability Mode, Quick Buffers, Launching Viewers, Quote & Un-quote and Unwrap Lines & Commit Word Wrap.
If you’re a casual or power user of Metapad I hope this article teaches you at least one new trick that you can use to make your text editing more productive.
1. Portability Mode (a.k.a. INI mode)
The newest feature in Metapad is actually fairly hidden — for better or worse. It’s called portability mode and it allows you to save all of your Metapad preferences in a local file (called metapad.ini) rather than in the Windows Registry. This is very handy when you’re moving Metapad around on a thumb drive or if you want to re-install Windows. Even better: you can sync your Metapad settings across multiple computers with Dropbox — just run metapad.exe and metapad.ini within a folder in your Dropbox (it will take up about 0.01% of a free 2GB account).
As a convenience, I added a little feature in Metapad 3.6 that will allow you to migrate your Metapad settings from the Registry into the metapad.ini file. Just type “metapad /m”, as in the following screencap, at the command prompt:
2. Quick Buffers
Quick Buffers are like having 10 extra independent clipboards to work with. You can set their contents using the Settings dialog (see image) or by selecting some text and using shortcut keys (Alt + Shift + [Number 0-9]). You can “paste” their contents into your Metapad files by pressing Alt and the number key corresponding to that Quick Buffer.
(I’m surprised that more text editors don’t have a simlar feature.)
3. Launching Viewers
There are 4 different commands that launch things from within Metapad.
First is a new Metapad window (or instance, hence the ‘i’ in Ctrl+I for the keyboard shortcut). This is different than New File (Ctrl+N), which clears out the current file and starts an empty one. New Window will also create an empty file but will keep your existing file around in the background.
The next two commands are for launching the primary and secondary viewers, corresponding to the “1” and “2” toolbar buttons (or use keyboard shortcuts Ctrl+L and Ctrl+J). These viewers are customizable and can be set to run any other program installed on your box. Metapad will pass the current file you’re viewing or editing to those programs. Set the paths to these viewers in the General Settings tab. Common uses are setting web browsers to view your web content (e.g., one for Firefox and the other for IE) or beefier editors that take longer to load but may offer features that Metapad does not.
Lastly, there is the “Default viewer” (Ctrl+D). This will open the program that has been associated with the current document’s file type (or extension). For example, if your computer’s default web browser is Chrome, you could launch the current HTML file you’re editing in Chrome with Ctrl+D and keep the other two external viewers (the primary and secondary) associated with two different browsers — say Firefox and IE as in the example above.
4. Quote and “Un-quote”
There are a number of handy text manipulation tools under the Edit | Convert Selected and Edit | Block menus, where a block refers to one or more lines of text that have been selected prior to using those commands. The following two commands in the Block menu are fairly unique to Metapad and may not be familiar to many folks.
The Quote command (Alt+Q) allows you to prefix each line in the block with a certain customizable string. The default quote string, editable in Settings, is “> ” which, once long ago, was commonly used to indicate lines in an original email that was being replied to. Quote can be used for other things, for example the string ” * “, could be used to instantly bullet-up a list.
When I added Quote, I also wanted a corresponding “unquote”, which is what the Strip First Character feature (Alt+Z) can be thought of as. This will delete the first character on each line of the selected block. Strip can be very handy for cleaning up things such as code copied from the web that has embedded line numbers.
5. Unwrap lines & Commit word wrap
Lastly we have another pair of tools that I believe is unique to Metapad (at least it was for many moons).
Unwrap Lines (F9) will take a file that has embedded carriage returns (i.e., new lines) and strips them all out. An alternate version Unwrap Lines w/ Space (Alt+F9) will replace carriage returns with a space to ensure wrapped words don’t get improperly joined. Running either of these effectively leaves you with one, potentially really long, line. (Aside: these effects can also be done using the basic (stressed: basic) regex support in the Replace dialog if you are so programmatically inclined).
Having one really long line usually isn’t so nice unless you turn on Word wrap mode (Ctrl+W or toolbar button). With wrap enabled, your document text will automatically fit the Metapad window, no matter what its line-length. Once in this mode, you are now able to run the complementary Commit Word Wrap (Ctrl+F9) which looks at how the document is auto-wrapped and sticks in carriage returns in the right spots so that each line’s wrapping is persisted, regardless of how wide the window is.
For example, say you have a document full of writing that has a bunch of lines, each no longer than 60 characters. To make each line at most 80 characters long, you would first ensure Word wrap is on (Ctrl+W if not), then Select All (Ctrl+A), Unwrap Lines (F9), resize the window so that each line is no longer than 80 characters (move your carret and watch the toolbar) and then finally do Commit Word Wrap (Ctrl+F9).
I hope these tips are at least a little enlightening. They were fun for me to remember and write about.
Quick Buffers are nice, although I don’t use a text editor that much for programming etc. And I use an clipboard manager in general (at the moment ClipX with Stickies plugin).
An addition to the (un)quote feature would be notepad2’s “Modify Lines”, where you can prefix and append text via dialogue. And unquote could be more powerful if you can define, how much characters are to be removed (okay, you can use Strip First Character for x times also :-).
PS: Any ideas/plans for further improvements? Unicode? ;-)
Marvellous functions and real great hints! Especially the unwrap / commit unwrap functions may save a lot of time.
My text viewer number one, but i´ve two sugestions,
a sort and a number features, it will be a better one
Comments are closed.