aoeui(1)
Heads up, bestie: -x isn't anywhere in this page, so I didn't invent it. Everything that is in the original is kept below π
Manual page aoeui(1) from the General Commands Manual, part 1 of 3 π¦
β¨ NAME β¨
aoeui - a lightweight visual editor optimized for the Dvorak keyboard π
β¨ SYNOPSIS β¨
aoeui [ -k ] [ -o ] [ -r ] [ -s | -S ] [ -t tab stop ] [ -u | -U ] [ -w command ] [file...]
β¨ DESCRIPTION β¨
okay so aoeui is an interactive display text editor that's basically made for people on the Dvorak keyboard layout πβ¨οΈ
when you run it with no file name arguments, it shows you a short command introduction and summary, so you're never just staring at a blank screen πΈ
and the big flex: aoeui can browse very large read-only files with super quick start-up time π because the original texts are memory-mapped from the files and aren't duplicated in memory unless they're about to be modified. no cap, that's iconic ππ₯
β¨ OPTIONS β¨
-kβ kills the keyword highlighting π ββοΈ (it's disabling keyword highlighting, bestie)-oβ don't save the original contents of a modified file infile~π§-rβ read-only mode! the file on disk does not get modified π-sβ use spaces, not tabs, for automatic indentation, even if the file seems to currently use tabs π-Sβ use tabs, not spaces, for automatic indentation, even if the file seems to currently use spaces π-t 8β set the tab stop to 8 or to some unreasonable value π this setting can be overridden on a per-text basis later π-uβ treat files as UTF-8 even if they contain invalid UTF-8 encodings π«Ά-Uβ don't treat files as UTF-8 even if they look like it π-w writability commandβ when an attempt is made to modify a read-only file, this command runs to try to put the file into a writable state β¨ inside it, the string%sgets replaced with the path name of the file. it's super useful for source code control systems, e.g.p4 edit %sπ
β¨ INTENTIONALLY MISSING FEATURES β¨
okay this section is giving "we did this on purpose" energy π
aoeui has no embedded extension language, because it's trivial to pass regions of text from the editor to any program or script that can read standard input and write standard output. the shell, sed(1), awk(1), python(1), and perl(1) are all usable for that kind of scripting π§ββοΈ and since aoeui ships with full sources and the rights to modify it, users can customize it directly π
the editor has only basic syntax highlighting of C and C++ keywords, with subtle color cues that help match up parentheses, brackets, and braces πΈ
aoeui has no mail or news reader, no IRC client, and no artificial intelligence psychologist mode ππ
there is no X window system interface, bestie. that's what xterm(1) and gnome-terminal(1) are for π¦
β¨ MODIFICATION β¨
okay so in the default mode, any characters you type without a command indicator just get inserted right at your cursor π. And this part is lowkey important: if your cursor is at the start of a selection, that selection gets cut to the clip buffer first, so your new text replaces it β¨.
^^β (that's Control-Shift-6, the caret character, on most keyboards, and^6will probably also work) π¦ this sneaks an otherwise untypeable control character into your text. The very next key you press gets taken literally if it's already a control character, or turned into one if it isn't, and then inserted. (Like, press^^and then hit Control-A or just a plain A, and you'll get character code0x01π«Ά.)^Space^^β with a numeric argument, probably in hexadecimal π₯, this drops the specified Unicode character into the text in UTF-8 format. If the text isn't UTF-8, the character code gets inserted directly as a big-endian literal.Tab(or^I) β tries tab completion first π , and if that flops, a TAB character gets inserted instead. If there's a selection with the cursor at its end, the editor hunts for an unambiguous continuation based on path names and words in all the views. Any continuation it finds gets appended to the selection, which makes opening a file with^Xway easier π. With no selection, but the cursor sitting right after one or more identifier characters, the editor searches for an unambiguous continuation using the words in the views. Any hit gets inserted as the new selection, with the cursor at its end. No tab completion happens when the cursor is at the beginning of a selection. In that case, the selection gets cut and replaced with a single TAB character.^SpaceTab(or^Space^I) β aligns the current line to the indentation of the previous one πΈ. With a numeric argument of1, it toggles whether the text uses tab characters for indentation. With a numeric argument between2and20, it sets the tab stop pitch.Enter(or^M) β inserts a new line with no automatic indentation.^J(or^Enterunder some good terminal emulators) β inserts a new line with automatic indentation β¨. If you hit^Jright after a{that doesn't have a closing}yet, it'll also add a properly-indented closing brace π.Backspace(or more properly, its synonym^?and sometimes, as in Mac OS X's Terminal application,^/) β deletes the character right before the cursor.^Dβ with no selection, deletes the character "under" the cursor. When a selection exists,^Dmoves it into the clip buffer, discarding any previously clipped text π .^Space^Dβ with no selection, selects the surrounding white space, as described earlier. When a selection exists,^Space^Dmoves it into the clip buffer. It goes before any old text if the cursor was at its beginning, and gets appended if the cursor was at its end. The whole point is that multiple^Space^Dcommands collect data together in the order you're most likely to have visited it π§.
A numeric argument to ^Space^D places the indicated number of copies of the selection into the clip buffer.
^Fβ requires a selection π. The selection gets copied into the clip buffer and then unmarked.^Space^Fβ is to^Fwhat^Space^Dis to^Dπ. It copies the selection to the clip buffer, putting it at the beginning or the end the same way^Space^Ddoes (see above). A numeric argument to^Space^Fplaces the indicated number of copies of the selection into the clip buffer.^Bβ with no selection, pastes the current clip buffer's contents. But with a selection, it does something bigger: the contents of the selection and the clip buffer get exchanged π. With a numeric argument,^Bpastes or exchanges with a numbered register, which is an alternate clip buffer. (The main clip buffer is the same as register0.) Besides being a way to keep text around for longer stretches of editing, registers also help you pull out the text that matches a parenthesized subpattern in a regular expression search π§ .
π SEARCHING π
^_β and its synonyms^/,^-, and^Aall enter search mode π. There are so many synonyms because they're often the same thing, or reserved key sequences, in the various window managers and thescreen(1)utility.
(Specifically, ^/ gets mapped to ^_ by many X terminal emulators, while ^- gets mapped to ^_ by the Mac OS X Terminal application. ^A is the default escape sequence in screen(1).)
^Space^_(and its synonyms) β the fancier version π§ searches for occurrences of POSIX regular expressions. Each non-command character you type after that gets appended to the current search target string, and the selection jumps to the next occurrence of it π―.
The case of alphabetic characters is not significant to the search π‘.
Most command characters will automatically take the editor out of search mode before executing, and the most recently discovered occurrence of the search target string will become the selection β¨.
A few commands have different meanings in search mode π:
Backspaceβ removes the last character from the search target and moves the selection back to its previous position.^Vβ is typically used to leave search mode with the currently highlighted search target as the selection.^_(or its synonyms) β with no characters in the search target string, causes the last successful search's target string to be reused.^Hand^Tβ cause motion to the previous and next occurrences of the search target string, not single-character motion.Enter(and^_and its synonyms) β simply leaves search mode with the cursor at the latest hit, and the mark returned to where it was before the search (if there was one) π. This is useful for using search to place the bounds of a selection.
π TEXTS, VIEWS, and WINDOWS π
^Kβ saves all modified texts back to their files πΎ.^Space^Kβ saves just the current text.^Xβ with no selection, inserts the path name of the current text as the new selection. With a selection containing a path name (possibly put together with the help of tab completion, see above),^Xraises up a window with a view into the indicated file. It creates a new text to hold it if one doesn't already exist πͺ.^Space^Xβ with a selection, renames the current text so it gets saved in another file.^Wβ finds an invisible view and associates it with the current window, making the current view invisible π». Hitting^Wrepeatedly cycles through all of the views. If there was no invisible view,^Wcreates a new scratch text, as does the^Space;command down below.^Space^Wβ does the same thing, but closes the window's current view, and also its text if it was the last view of that text π.^Yβ splits the current window horizontally, raising up an invisible or new view in the lower half of the original window β¬οΈ.^Space^Yβ splits the current window vertically, raising up an invisible or new view in the right half of the original window β‘οΈ.^Pβ moves to another window π.^Pwith a numeric argument β moves to a specific window. Number1is in the upper left-hand corner of the display π.^Space^Pβ moves to another window, closing the old one π.^Space;(note that;is not a control character) β creates a new anonymous text π.^Space#(note that the number sign is not a control character) β displays the current position's path name and line number π’.^Space?(note that the question mark?is not a control character) β displays a new window with the built-in help summary of commands π.
π MACROS π
^Space^Oβ commences recording your keystrokes as the macro. The recording keeps going until the next^Oor another macro recording π¬.^SpaceF1-F12β commences recording your keystrokes as a new macro for a function key πΉ.
Heads up, bestie π:F1andF11are typically hijacked by window managers for their own purposes, so they probably won't be usable.
^Oβ ends the recording of a macro, if one is in progress π. Afterwards,^Oreplays the macro, possibly with a repeat count as the argument βΆοΈ.
Watch out π: a failed search in a macro will terminate its execution.
π¦ FOLDING π¦
aoeui supports the "folding" of portions of text into what appear to be single characters πͺ, and the reverse "unfolding" operation too. To give outline views of texts like heavily-indented source code, aoeui also has an automatic nested folding capability π³.
^Space,β with a selection, folds the selection. Otherwise, it repeatedly folds indented regions of the text to provide an outline view πΏ. A numeric value, if any, specifies the number of leading spaces or equivalent tabs at which code lines will be folded. The default is1, which causes the folding of any line that isn't left-justified.^Space.β with a selection, or immediately atop a folded section, unfolds the topmost foldings within it π. Otherwise, and if there is a numeric value, it completely unfolds the entire view β¨.
β¨ SHELLS β¨
Okay bestie, this is where aoeui gets wild π₯. ^E with no selection just launches an interactive shell in a brand new scratch text π. But with a selection? ^E runs the shell command in your selection, feeds it whatever's in the clip buffer as standard input (if anything's there) π§ , and collects the output asynchronously in the background, then swaps it in to replace your selection π
. So a bunch of super helpful UNIX text processing commands are literally at your fingertips π«Ά. Some handy ones to know:
- cat(1) β to include another entire file, or to receive writes to a named pipe πΈ
- mkfifo(1) β to create a named pipe so commands in other windows can pipe their output into a text running
catin the background π§ cd pathβ to change the editor's current working directory (a special case, since it's not actually passed to a shell) π- grep(1) β to search for lines containing a pattern π
- sort(1) β to rearrange lines alphabetically or numerically, possibly reversed π
- uniq(1) β to discard duplicated lines ποΈ
- sed(1) β as in
sed 's/FROM/TO/g'to perform unconditional search-and-replace with regular expressions πͺ - tr(1) β to convert lower to upper case with
a-z A-Z, and to remove DOS carriage returns with-d '[\r]'π§Ή - fmt(1) β to reformat paragraphs of natural language text π
indent -st -kr -i8 -nbboβ to reformat C language source code sensibly π»column -tβ to realign data nicely into columns πman | colcrtβ to read a man page π- tail(1) β to monitor additions to a file, like a log π
- make(1) β to compile your code π οΈ
aspell list | sort | uniq | columnβ to get a list of words that may be misspelled π
And ^Space^E with no selection will terminate the output of any asynchronous child process that's still running π.
β¨ TIPS β¨
Okay, these tips are lowkey the best part π Here we go:
- To select the rest of the line after the cursor, use
^V^Cπ¦ - It is often faster to retype a bungled word than to fix it. Just use
^V^Nand then retype π - Transposing multiple blocks of text is easy with
^B. It basically takes the usual paste operation and turns it into an exchange of the clip buffer with the selection πβ¨ - Incremental search and replacement can be done with a macro, or by clipping the replacement text. On search hits you want to replace, use
^V^B^F^/^/to exchange the hit with the replacement text, copy it back to the clip buffer, and move on to the next occurrence of the search pattern π§ . But when the replacement text is short, it's honestly easiest to just overwrite the selection by hitting^V^Dand immediately retyping the new text π¨ - Reconfigure your keyboards so that the key to the left of A (probably labeled Caps Lock) is interpreted as a Control modifier instead π This is a whole glow-up for your fingers π«Ά
- The gnome-terminal(1) terminal emulator works well with aoeui if you configure the terminal's scrollback limit to a relatively small value π
- To move backward or forward by half a screenful, use
^Ror^Land then^Z. (Or set the environment variableAOEUI_OVERLAPto50.) π - To insert characters with a repeat count, type the characters into a new selection, cut into the clip buffer with a repeat count using
^Space^D, and then paste with^Bπ
β¨ BUGS β¨
Bugs? Bestie, they're inevitable π Please tell me about any that you find π«Ά
β¨ ENVIRONMENT β¨
Okay, environment variables. Let's go πΈ
SHELLβ names the program that the^Ecommand runs πROWSandCOLUMNSβ may be set to override aoeui's automatic mechanisms for figuring out the size of the display surface πTERMβ when set to a string beginning withxterm, makes aoeui use the title bar of the terminal emulator as a status indicator. It shows the path name of the active view and whether or not it's been saved since it was last modified πͺ§ Unless the file is large, it also shows the line number of the cursor π’TERM_PROGRAMβ if set toApple_Terminal, makes aoeui work around Apple's Terminal emulator's behavioral differences from standard Xterm πAOEUI_WRITABLEβ the default command used when the-woption isn't given πΎAOEUI_OVERLAPβ the percentage of overlap when scrolling a window up with^Ror down with^L. The default is1, for minimal overlap π
β¨ FILES β¨
Let's talk about the files aoeui leaves around π
file~β gets overwritten with the original contents of file unless the-ooption is used π«£file#β holds the temporary image of the edited file while aoeui is running. It may be useful for recovery if the editor gets killed πTAGSβ is found and read in by the^Space'command to supply the tags that get scanned. The search forTAGSbegins in the same directory as the current view's text, and proceeds up through its parents π³$HOME/.aoeuiβ holds any new "anonymous" texts created during editing sessions π§
β¨ SEE ALSO β¨
Read these next, you won't regret it π€β¨
asdfg(1), ctags(1), exuberant-ctags(1), regex(7)
Helpful commands to use with ^E: aspell(1), cat(1), colcrt(1), column(1), fmt(1), grep(1), indent(1), mkfifo(1), sed(1), sort(1), tailf(1), tr(1), uniq(1) π
β¨ AUTHOR β¨
Peter Klausler <pmklausler@gmail.com> wrote aoeui π
π And that's the whole page, bestie! π This is aoeui(1), dated November 27, 2012. Go forth and slay your editor π¦β¨
π¦ where this page comes from
- debian bookworm: aoeui 1.7+20160302.git4e5dee9-3 Β· GPL-2.0-or-later
- debian trixie: aoeui 1.7+20160302.git4e5dee9-3 Β· GPL-2.0-or-later
- ubuntu jammy: aoeui 1.7+20160302.git4e5dee9-3 Β· GPL-2.0-or-later
- ubuntu noble: aoeui 1.7+20160302.git4e5dee9-3 Β· GPL-2.0-or-later
- ubuntu resolute: aoeui 1.7+20160302.git4e5dee9-3build1 Β· GPL-2.0-or-later
- ubuntu stonking: aoeui 1.7+20160302.git4e5dee9-3build1 Β· GPL-2.0-or-later
- Copyright 2007 Peter Klausler
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms