# Text Editors #list #tech #snark If you want to edit text in your terminal, you basically have only four options: 1. Vim 2. Emacs 3. VS Code 4. Notepad.exe ## Vim (and its ten million spinoffs) The undisputed king of text editing, it unfortunately locks its power behind the worst interface known to humankind. Far more damning than the abstruse keymappings cult members are forced to memorize is that Vim's interface is modal. > Mode error is really design error. Mode errors are especially likely where the equipment does not make the mode visible, so the user is expected to remember what mode has been established, sometimes hours earlier, during which time many intervening events might have occurred. > — [[The Design of Everyday Things|https://dl.icdst.org/pdfs/files4/4bb8d08a9b309df7d86e62ec4056ceef.pdf]], "Mode-Error Slips" > Every time you switch tasks, you pay a price, known in computer science as a *context switch*. ... Humans clearly have context-switching costs too. We feel them when we move papers on and off our desk, close and open documents on our computer, walk into a room without remembering what had sent us there, or simply say out loud, “Now, where was I?” or “What was I saying?” > — [[Algorithms to Live By|https://annas-archive.gl/md5/ea8cb22be91094625891a5a462a236a8]], "Preemption Isn’t Free: The Context Switch" ## Emacs The also-ran of the text editor wars, Emacs has not resulted in anywhere near the number of spinoffs of Vim because it is really more of an operating system than a text editor. Emacs users typically plan their schedules, send emails, and browse the web through Emacs; presumably they occasionally edit text with it too. Emacs cultists sacrifice their entire computing environment to their new god, and hence don't mind waiting an hour for it to start. There is something admirable about Emacs' complete lack of interest in adhering to the Unix philosophy (one tool should do one thing and do it well). Emacs is also fascinating as the last remaining vestige of the [[Lisp Machine|https://en.wikipedia.org/wiki/Lisp_machine]]; it should be toured like one would a computer museum. ## VS Code (Zed, Flow Control, etc.) If you like Visual Studio Code®, The Open Source AI Code Editor by Microsoft™, you now have many options for using it in your terminal. You can even pretend your terminal isn't a terminal: use your mouse for everything, clutter up the interface with pointless "Nerd Font" icons, take advantage of the millions of colors your shiny new terminal emulator has been inexplicably blessed with; hell, you can probably even send telemetry somewhere. Guaranteed to be almost as bad the real thing! This category seems to have a disproportionate quantity of programs that are LLM vibeslop. I wonder why? ## Notepad.exe (nano, ne, micro, etc.) This is the category of text editors for people who just want to edit some damn text. It's obviously the best of the bunch, but the minimalism and noob-friendliness mean a lack of features for power users. You will not ascend to the heavens in a cloud of euphoria when you use it; you will, instead, feel a vague malaise that you've been left out of a club. Instead of learning how to use your text editor, your time will be ~~wasted~~ well-spent learning the deep magicks of shell command invocations required to patch up the gaping holes in your text editor's feature set. Hope you like escaping strings! Vim won't look so bad after an hour with sed and awk. ## Bonus: The Freaks Surveying the above list might fill you with a sense of despair. You might be tempted to go exploring way off the beaten path. Maybe we went all wrong with this whole text editor thing and we should just edit lines with ed. If it was good enough for K&R in 1973, it ought to be good enough for us today! This is the text editor equivalent of going on a silent Buddhist retreat. After a few minutes as an ascetic, you will hopefully learn to love yourself. Then you might cast your gaze farther afield from the Unix standard. There are other operating systems, after all. [[Whatever the hell the Plan 9 people are doing|//9front.org/]] seems pretty cool. Maybe we took a wrong turn and we're supposed to be on the Plan 9 timeline. Maybe you should try Sam or Acme? **BZZZZZZZT.** These programs are graphical; worse, they require a *mouse*, and you'll have to spin up a VM every time you use them or deal with naked X windows. Your beloved shell will miss you. Once you've tried out Plan 9 and realized we're definitely on the good timeline, there is one last resort. Maybe the perfect text editor isn't languishing in obscurity. Maybe it was actually wildly popular, for years, even among normal people who don't know what a Unix is. Maybe you should turn to DOS. Lotus? WordPerfect? WordStar? If your desperation leads you this far, pray that you never encounter UTF-8, and may god have mercy on your soul.