o(1)

πŸ“¦
version 2.74.6 Β· 2 versions
, in arch rolling, nixpkgs unstable

πŸ’– o(1) πŸ’–

okay so bestie, listen up β€” this is o, the editor. yes, the whole name is literally one letter. iconic. it's a user command and it's gonna be your new fave, no cap.


✨ NAME ✨

o β€” an editor. that's it. that's the whole name. one letter. main character energy fr fr.


🌸 SYNOPSIS 🌸

o filename [LINE NUMBER]

πŸ¦‹ DESCRIPTION πŸ¦‹

Edit an existing file or create a new one. simple as that, bestie. you give it a file, it lets you edit it. if the file doesn't exist yet, congrats, you just made a new one. slay.


πŸŽ€ OPTIONS πŸŽ€

okay so before we get into the flags, quick heads up: the line number can be prefixed with +, or it can be a suffix of the filename if prefixed with :. iykyk.

  • -c FILENAME, --copy FILENAME β€” copies the given file straight into the clipboard. so convenient, honestly obsessed.
  • -f, --force β€” ignores file locks when opening files. you're basically telling it "i know what i'm doing" and it believes you. use responsibly bestie πŸ’…
  • -l, --last-command β€” outputs the last used build/format/export command. perfect for when you forgot what you just ran, which, same.
  • -m FILENAME, --monitor FILENAME β€” monitors the given file for changes and opens it as read-only. it's giving "watch but don't touch" vibes.
  • -n, --no-cache β€” avoids writing the location history, search history, game highscore and last build/format/export command to the cache directory. no receipts, no paper trail, we love a private queen.
  • -p FILENAME, --paste FILENAME β€” pastes the contents of the clipboard into the given file. combine it with -f to overwrite the file. cute combo, honestly.
  • -e, --clear-locks β€” clears all file locks and closes all portals. a little reset moment, we stan.
  • -o, --ollama β€” enables Ollama-specific features. the model can be specified in the OLLAMA_MODEL environment variable. this requires that Ollama is up and running, either locally or at the host specified in the OLLAMA_HOST environment variable. any server that speaks the Ollama API can be used, for instance llmman, by setting LLMMAN_HOST to localhost:17434. lowkey futuristic, highkey useful.
  • -r, --release β€” builds release executables when ctrl+b is pressed, or builds projects when no filenames are given. ship it bestie πŸš€
  • -t, --list β€” lists the file in a colorful way without opening it for editing. a little peek, no commitment. we love a preview.
  • -b, --build β€” builds the given file instead of opening it for editing. sometimes you just need to build, not read. valid.
  • -F, --fmt β€” formats the given file in place and quits. runs headless: no TTY, no UI. it's giving "i work alone" and honestly? respect.
  • -k, --create-dir β€” when opening a new file, creates directories as needed. no more "no such file or directory" meltdowns. we love a problem solver.
  • -d, --debug β€” starts in debug mode. for when you're feeling detective-y πŸ”
  • -s, --digraphs β€” lists all possible digraphs. the full menu of two-letter symbol magic, served fresh.
  • -i FILENAME, --input-file FILENAME β€” used as stdin when running programs with ctrl+b. the default filename is input.txt. noted, bestie.
  • -a, --nano β€” emulates Pico/Nano. for the besties who can't let go of the classics. we see you, we love you.
  • -q, --quick-help β€” always displays the quick help pane at start. a little welcome committee, every single time.
  • -z, --no-quick-help β€” never displays the quick help pane at start. for the "i already know everything" girlies. periodt.
  • -x, --noapprox β€” disables approximate filename matching. no more "did you mean…", it's exact or nothing.
  • -g GLOB, --glob GLOB β€” searches for and opens the first filename that matches the given substring. first match wins, no drama.
  • -v, --version β€” displays the current version. a little identity check ✨
  • -h, --help β€” displays brief usage information. the "help me help you" option, we've all been there.

πŸ’… KEYBINDINGS πŸ’…

okay this is the part where it gets good. these are your shortcuts, your little secret handshakes with the editor. memorize them and you'll be moving different, fr fr.

  • ctrl+q β€” quits o. the classic exit, the farewell, the "i'm done here" moment.
  • ctrl+s β€” saves the file. don't forget to do this. seriously. save your work bestie 😭
  • ctrl+w β€” formats the current file with goimports or clang-format, depending on the file extension. Zig, V, Rust (rustfmt), Haskell (ormolu) and Python (ruff format) are also supported. if in git mode, it cycles the git interactive rebase keyword on the current line. if in Markdown mode, it formats the table under the cursor. multitasking queen.
  • ctrl+a β€” goes to the start of the text, then the start of the line and then the previous line. it's a little journey, enjoy the ride.
  • ctrl+e β€” goes to the end of the line and then the next line. the forward march, we love to see it.
  • ctrl+n β€” scrolls down 10 lines or goes to the next match if a search is active. inserts a new column when in the Markdown table editor. jumps to a matching parenthesis or bracket if the arrow keys were just used. this key does the most, honestly.
  • ctrl+p β€” scrolls up 10 lines or goes to the previous match if a search is active. removes an empty column when in the Markdown table editor. jumps to a matching parenthesis or bracket if the arrow keys were just used. the up-and-coming sibling of ctrl-n, equally iconic.
  • ctrl+k β€” deletes all characters to the end of the line. deletes the line if it is empty. brutal but fair.
  • ctrl+g β€” goes to an include or definition, goes back or toggles the status bar. a little three-in-one, we love efficiency.
  • ctrl+d β€” deletes a single character. the tiny little delete, for tiny little fixes.
  • F1 β€” shows the overview of hotkeys, the same as pressing ctrl+l and then /. the cheat sheet, the holy grail, the "help i forgot" savior.
  • F2 β€” saves, the same as ctrl+s. save button energy.
  • F3 β€” goes to the next search match, the same as ctrl+n. keep looking, bestie.
  • F4 β€” launches the file browser, which is also available from the ctrl+o menu. a little window shopping for your files.
  • F5 β€” builds or exports, the same as ctrl+space. in debug mode, it continues. the go-button, basically.
  • F6 β€” toggles block editing mode, which is also available from the ctrl+o menu. block party, but make it text.
  • F7 β€” jumps to the next typo. yes, it hunts typos for you. a whole detective πŸ•΅οΈβ€β™€οΈ
  • F8 β€” in debug mode, steps over. the same as F10, which some terminals take for themselves. terminal drama, we hate to see it.
  • F9 β€” in debug mode, toggles a breakpoint. the same as ctrl+b. pause moment, but make it purposeful.
  • F10 β€” in debug mode, steps over. the same as ctrl+o. yes it's also F8, we don't make the rules.
  • F11 β€” in debug mode, steps out. the same as ctrl+f. exit stage left.
  • F12 β€” goes to a definition or include, the same as ctrl+g. the "take me to it" key.
okay big heads up bestie: on macOS, the function keys may need to be held together with Fn, depending on the keyboard settings. apple being apple, you know how it is πŸ™ˆ
  • ctrl+o β€” opens the command menu, which is a list of actions that can be performed. if editing a PKGBUILD file and guessica is installed, there will be a menu option for updating the pkgver + source fields. if pandoc is installed, a menu option for rendering to PDF may appear. a little menu of possibilities, we love options.
  • ctrl+t β€” for C and C++: switches between the corresponding header and implementation. for Agda, inserts a symbol. for Markdown, if the cursor is on a table, launches the Markdown table editor. for the rest, records and plays back keypresses. press escape to clear the current macro. this key is a literal shapeshifter and we respect the range.
  • ctrl+c β€” press twice to copy the current block of text (until a blank line or the end of the file). press once to only copy the current line. press thrice to copy the current function. also closes the portal. copy queen, we bow 🫢
  • ctrl+v β€” press once to paste only the first line of the copied text, trimmed. press twice to paste all the copied text, untrimmed. paste with options, honestly genius.
  • ctrl+x β€” press once to only cut the current line (or delete the line, if empty). press twice to cut the current block of text (until a blank line or the end of the file). press thrice to cut the current function. also closes the portal. the cut version of ctrl-c, equally powerful βœ‚οΈ
  • ctrl+b β€” builds programs, renders to PDF or exports to man page. press twice to also run after building. use o -l to view the last build command. cycles book mode. toggles a breakpoint in debug mode. toggles bold when started directly in book mode. this key is booked and busy, no pun intended.
  • ctrl+i β€” toggles italic in book mode. otherwise the same as tab. terminals that can not display italics, like the Linux console, show it unstyled. we tried, okay 😭
  • ctrl+j β€” joins lines. the little matchmaker, bringing lines together.
  • ctrl+u β€” undo (ctrl+z is also possible, but may background the application). the classic take-it-back, we all need it.
  • ctrl+y β€” redo. for when you undo too much, which, relatable.
  • ctrl+l β€” jumps to a specific line number or percentage. press return to jump to the top. press return again to jump to the bottom. press one of the highlighted on-screen letters to jump to that location. a little teleportation device, we stan.
  • ctrl+f β€” searches for a string from the current location. the search wraps around and is case sensitive. there is also support for text replacement, after typing in the search term: to replace all, press tab instead of return, enter a replace term and then press tab. to replace once, press tab instead of return, enter a replace term and then press return. search for just f to find the previous function signature. the find key with bonus features, we love a multitasker.
  • esc β€” goes back after having gone to another location or file. redraws the screen and clears the last search. the universal "nvm" button, honestly iconic.
  • ctrl+space β€” builds programs, renders to PDF or exports to man page. press twice to also run after building. toggles checkboxes in Markdown. cycles display and export options in book mode. o will try to jump to the location where the error is and otherwise display "Success". the last used external command by o can be found in ~/.cache/o/last_command.sh. the ultimate power move key.
  • ctrl+~ β€” inserts the current date and time. timestamp queen πŸ•
  • ctrl+\ β€” toggles single-line comments for a block of code. comment out the whole vibe.
  • ctrl+_ β€” inserts a symbol by typing in a 2-letter digraph. the digraphs are the same as for ViM. for a full overview, see: https://raw.githubusercontent.com/xyproto/digraph/main/digraphs.txt. symbol magic, we love to see it ✨
  • ctrl+r β€” jumps to matching bracket, otherwise opens or closes a portal. double press to toggle "wrap when typing". for git interactive rebase, cycles keywords. bracket matcher and portal opener, dual threat.

🌈 ENV 🌈

environment variables, the backstage crew of the whole operation. here's what's what:

The NO_COLOR environment variable can be set to 1 to disable all colors. for the monochrome girlies, we respect it.

If XTERM_VERSION is set (usually automatically by xterm), the "light" color scheme will be used. a little brightness for your day β˜€οΈ

The ORBITON_OLLAMA environment variable can be set to 1 to enable Ollama-specific features. AI bestie mode: activated.

The OLLAMA_MODEL environment variable can be set to specify which Ollama model to use for code completion. pick your fave, we don't judge.

The OLLAMA_HOST environment variable specifies the host for the Ollama service if a non-local service should be used. remote work, but make it AI.

The LLMMAN_HOST environment variable is used if OLLAMA_HOST is not set, for using llmman (https://github.com/llmmanorg/llmman), which serves the Ollama API on port 17434. fancy, we love a specialized option.


🧚 MAN PAGER 🧚

O can be used for viewing man pages by setting MANPAGER to "o" with ie. export MANPAGER=o. yes, you can read man pages inside o. inception, but make it documentation. we love a self-referential queen.


πŸ’œ WHY πŸ’œ

"I wanted to write a simple editor that only used VT100 terminal codes." β€” the author, being iconic and humble at the same time. a whole legend 🫢


⭐ SEE ALSO ⭐

e3(1) nano(1) micro(1) β€” the other editors in the neighborhood. say hi when you see them.


πŸ’€ KNOWN BUGS πŸ’€

okay bestie, nobody's perfect, not even o. here's the tea:

  • In some terminal emulators, scrolling quickly up or down with the arrow keys can make the text jump around (it works fine in alacritty). scroll up and down with ctrl+n and ctrl+p instead to avoid this. press esc to repaint the text, if needed. terminal drama, but we have workarounds πŸ’…
  • Some unicode runes may disrupt the text flow. this is generally not a problem for editing code and configuration files, but may be an issue when editing files that contains text in many languages. multilingual queen problems, honestly.
  • For some terminal emulators, if o is busy performing an operation, pressing ctrl+s may lock the terminal. some terminal emulators, like konsole, can be configured to turn off this behavior. press ctrl+q to unlock the terminal again (together with the unfortunate risk of quitting o). you can also use the ctrl+o menu for saving and quitting. a little risky but we persist 😭
  • o may have issues with large files (of several MB+). for normal text files or source code files, this is a non-issue. big files are a lot, we get it.
  • Middle-click pasting (instead of pasting with ctrl+v) may have issues with only pasting the first character. the middle-click betrayal, we've all been there.
  • The smart indentation is not always smart. it's doing its best, okay πŸ™ˆ

πŸ‘‘ VERSION πŸ‘‘

2.74.6 β€” the current version, the moment, the era.


πŸ“ AUTHOR πŸ“

o was written by Alexander F. Rødseth <xyproto@archlinux.org>. a whole legend, we stan the creator 🫢


and that's the whole manpage bestie! you're now officially an o expert. go forth and edit, build, format, and slay. this was o(1) from 09 Oct 2026, version 2.74.6, written by Alexander F. RΓΈdseth. catch you in the terminal πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from