On text editing

Up on their soapbox again...

Plain text files, for most people, conjure up memories of Notepad.exe, or perhaps long web forms. Type a little, make a typo, reach for the arrow keys—or reach for the mouse and try your best to hit the tiny target in-between the two characters you want. Often you miss, and end up pressing the arrow keys a few times anyways. Maybe it's quicker to hammer the delete key? Wait, we can undo… wait, not that change, the other one…!

Most of the world's computer technology runs on plain text. Most programming languages are written as plain text files, along with configuration and data storage for most programs. This is because plain text (though not perfect) is the most universal and portable way to present data. Even in the Windows realm, although attempts are made to hide the fact, many special file formats are just plain text—even Microsoft Word documents are just XML. Heck, I even write this website in plain html, no fancy WYSIWYG editor or framework required. Indeed, it seems the ability to edit plain text is an essential skill for seizing agency in cyberspace. Despite this—and/or, predictably—there is very little facility for editing plain text in most base-level consumer operating systems. Windows has the aforementioned Notepad.exe, but MacOS has... well, MacOS has seemingly nothing for the casual user; even its Notepad seems to save to some strange format, if it saves anywhere at all. If you dare open the terminal, there's at least an ancient copy of Emacs sitting there (last I checked), but that's hardly "user-empowering". And don't get me started on Chromebooks…

But enough complaining. How do we claim back our agency with the tools we have? How do we meet ourselves where we are? Well, there are a few things we can do…

Learn what was never taught

Indeed, there certain shortcuts for editing text that for some reason were just never conveyed in school—not for me, at least. Most programs on (and compatible with) Windows will enable an "operate by words" mode upon holding down the Ctrl key; instead of the arrow keys moving the text cursor by characters, it will move by words; backspace and delete will remove whole words. This alone is a boost, but with the addition of a full keyboard—or learning the right modifier contortions on your laptop—one can also find power in the use of the home, end, page up and page down keys. All of these forgotten techniques are available in most text fields on Windows.

For those on MacOS, some might be delighted to find that a few of the Emacs controls will work. In the appropriate tongue: C-a to go to the start of the line, and C-e to go to the end; C-f and C-b to go forwards and backwards a character, and C-p and C-n to go up and down a line. The same shortcuts with M- held down instead will move by words and sentences.

For either operating system, selecting text is a whole lot easier when you know that you can double-click (click-and-hold) to select by words, and triple-click (double-click-and-hold) to select by paragraphs or lines (depending on the text structure), although Windows does not give great feedback for this. Some software will even let you hold Ctrl to make multiple selections of disparate fields of text. There is even a "primary" clipboard (the usual one is actually the "secondary" one) which is filled with whatever text was selected last; this can be pasted by middle clicking (try middle clicking on your browser's "new tab" button!). If you don't think you have a middle mouse button, try pressing down on your mouse wheel. If it clicks, you do!

Obtain what was never granted

These secrets will be enough for most people, at first. Using webmail, writing YouTube comments, and editing Google docs will be easier. But if you find yourself seeking more, for whatever reason—editing raw HTML/CSS, writing long prose, dealing with python indentation—be assured that there is always more. Tools like Emacs, (Neo)vim, and the POSIX standard commands are all there to help with whatever domain-specific plain text editing needs done. Here is found an open secret: much of what makes programming possible is the tools around it. It sounds obvious—clearly, there would be no skyscrapers without power tools—and yet it can be hard to conceive of such things ex nihilo. For example, one of the assets of the Lisp family of programming languages is their homoiconicity (that is, their extremely simple syntax) despite their power and flexibility. However, one look at Common Lisp or Scheme code shows immediately that without proper editing tools, writing good lisp code would be almost impossible, due to the excessive amounts of nesting and indentation involved in making the terse syntax human-readable.

Give your skills their space

Whatever level you're at in your plain-text-fu, the next step is to let them take their space. This means finding ways to apply them "in real life", at work, as you write emails, fill out forms, edit reports; in your personal life, as you communicate with friends, make presentations for your community, contribute to free software. Try opening random file types in a text editor, and switching through a few different encodings. When you see someone else struggling to edit text, share your skills with them. Use your plain-text skills proudly and conspicuously, and society around you will be better for it.