Orbiton is a text editor and a simple IDE with the following leading principles:
- Minimal annoyance (within the limits of
VT100) - Not be configurable, to help users stay focused (with the exception of themes)
- Facilitate rapid edit-format-compile-run cycles
Please submit a PR if anything can be improved to help adhere to these.
Orbiton might be a good fit for:
- Writing git commit messages (using
EDITOR=o git commit). - Editing
README.mdandTODO.mdfiles. - Writing Markdown and then exporting to HTML or PDF.
- Learning programming languages, like Rust or Zig.
- Editing files deep within larger Go or C++ projects.
- Solving Advent of Code tasks.
- Being placed on a live image for a Linux or BSD distro, since it supports VT100, is small and self-contained, has a built-in log, man page and image viewer, has an optional nano/pico mode, can be used as a
visudoreplacement and has built-in support for neatly formatting/etc/fstabfiles. - Writing any number of words in a distraction-free fullscreen environment (toggle the status bar by pressing
ctrl-gto see the word count).
This has been my main editor for around 3 years now (since early 2022), and it is mostly written in itself, apart from some NeoViM in the early beginning.
Screenshot of the VTE GUI application (that can be found in the gtk3 directory), running the o editor:
Stepping through the assembly instructions of a Rust program by entering debug mode with the ctrl-o menu and then stepping with ctrl-n:
Editing a C source file in og using the "synthwave" theme:
There are also light themes available:
Writing commit messages:
| orbiton |
|---|
With Go 1.21 or later, the development version of o can be installed like this:
go install github.com/xyproto/orbiton/v2@latest && mv -i ~/go/bin/orbiton ~/go/bin/o
Adjust the mv flags and the ~/go/bin path as needed. Perhaps go install will have an -o flag in the future.
Alternatively, download and install a release version. For example, for Raspberry Pi 2, 3 or 4 running Linux:
curl -sL 'https://github.com/xyproto/orbiton/releases/download/v2.70.2/orbiton-2.70.2-linux_armv7_static.tar.xz' | tar JxC /tmp && sudo install -Dm755 /tmp/orbiton-2.70.2-linux_armv7_static/o /usr/bin/o && sudo install -Dm644 /tmp/orbiton-2.70.2-linux_armv7_static/o.1.gz /usr/share/man/man1/o.1.gz
To set:
git config --global core.editor o
To unset:
git config --global --unset core.editor
By setting the MANPAGER environment variable, it's possible to use o for viewing man pages:
export MANPAGER=o
An alternative to viewing man pages in o is to use less:
export MANPAGER='less -s -M +Gg'
Install o manually, until an OpenSUSE package exists:
git clone https://github.com/xyproto/orbiton
cd orbiton
make && sudo make install
The following is not strictly needed, but it sets everything up to make full use of o:
Add this to ~/.alias:
alias o=/usr/bin/o
Add this to ~/.profile:
export MANPAGER=/usr/bin/o
export EDITOR=/usr/bin/o
Log out and in again to activate the changes.
These features are unique to o, as far as I am aware:
- If the loaded file is read-only, all text will be red by default.
- Smart cursor movement, trying to maintain the X position when moving up and down, across short and long lines.
- Press
ctrl-vonce to paste one line, pressctrl-vagain to paste the rest. - Press
ctrl-conce to copy one line, pressctrl-cagain to copy a block of lines (until a blank line), pressctrl-cagain to copy the current function. - Open or close a portal with
ctrl-r. When a portal is open, copy lines across files (or within the same file) withctrl-v. - Build code with
ctrl-spaceand format code withctrl-w, for a wide range of programming languages. - Cycle git rebase keywords with
ctrl-worctrl-r, when an interactive git rebase session is in progress. - Jump to a line with
ctrl-l. Either enter a number to jump to a line or just pressreturn(ort) to jump to the top. Pressctrl-landreturnagain (orb) to jump to the bottom. Presscto jump to the center. - When jumping to a specific line in a file with
ctrl-l, jumping to a percentage (like50%) or a fraction (like0.5or.5) is also possible. It is also possible to jump to one of the highlighted letters. - If tab completion in the terminal went wrong and you are trying to open a
main.file that does not exist, butmain.cppandmain.odoes exists, thenmain.cppwill be opened. - Search by pressing
ctrl-f, entering text and pressingreturn. Replace by pressingtabinstead ofreturn, then enter the replacement text and pressreturn. Searching for unicode runes on the formu+0000is also supported. - Type
iferron a single line in a Go or Odin program and pressreturnto insert a suitableif err != nil { return ... }block, based on koron/iferr. - Use the built-in Markdown table editor by pressing
ctrl-twhen the cursor is on a table. This works best for tables that are not too wide. - Format Markdown tables by moving the cursor to a table and pressing
ctrl-w. - For C-like languages, missing parentheses are added to statements like
if,forandwhilewhen return is pressed. - Pressing
ctrl-ftwice searches for the word under the cursor. - Lines are highlighted only when the up and down arrow keys are used.
- The name of the function that the cursor is within, is shown in the upper right corner of the screen, for some programming languages.
- The syntax highlighting is instant.
- Opens files quickly.
- Can compile
"Hello, World"in many popular programming languages simply by pressingctrl-space. - Create, build and run a simple program in C, by running
o main.c, pressingctrl-wand then a doublectrl-space. - Configuration-free, for better and for worse.
- Can preview
.png,.jpg,.jpeg,.gif,.ico,.bmpand.webpimages directly in the terminal (using a scaled down version and up to 16 colors). - The
-pflag followed by a filename can be used for just pasting the clipboard to a new file, instead of editing a file. ctrl-tcan jump between a C++ header and source file, when editing C++ code.ctrl-tshows the Markdown table editor, when editing Markdown and the cursor is on a Markdown table.- Can only edit one file at the time, by design.
- Provides syntax highlighting for Go, Rust, C++, Markdown, Bash and several other languages. There is generic syntax highlighting built-in.
- Will jump to the last visited line when opening a recent file.
- Is provided as a single self-contained executable.
- Loads faster than both
vimandemacs, for small files. - Can render text to PDF either by itself or by using
pandoc. - Tested with
alacritty,konsole,st,urxvt,xfce4-terminal,xtermandzutty. - Tested on Arch Linux, Debian, OpenSUSE, macOS, FreeBSD and OpenBSD.
- Never asks before saving or quitting. Be careful.
- The
NO_COLORenvironment variable can be set to disable all colors. - Rainbow parentheses makes lines with many parentheses easier to read.
- Limited to VT100, so hotkeys like
ctrl-aandctrl-emay need to be used instead ofHomeandEnd. And for browsing up and down,ctrl-nandctrl-pmay be used. - Compiles with either
goorgccgo. - Will strip trailing whitespace whenever it can.
- Must be given a filename at start.
- May provide smart indentation.
- Requires that
/dev/ttyis available. xclipfor X,wl-clipboardfor Wayland orpbcopyfor macOS needs to be installed to access the system clipboard.- May take a line number as the second argument, with an optional
+or:prefix. - If the filename is
COMMIT_EDITMSG, the look and feel will be adjusted for git commit messages. - Supports
UTF-8, but some runes may be displayed incorrectly. - Only UNIX-style line endings are supported (
\n). - Will convert DOS/Windows line endings (
\r\n) to UNIX line endings (just\n), whenever possible. - Will replace non-breaking space (
0xc2 0xa0) with a regular space (0x20) whenever possible. - Will replace annoying tilde (
0xcc 0x88) with a regular tilde (~) whenever possible. - Will replace the greek question mark that looks like a semicolon (
0xcd 0xbe) with a regular semicolon (;) whenever possible. - If interactive rebase is launched with
git rebase -i, then eitherctrl-worctrl-rwill cycle the keywords for the current line (fixup,drop,editetc). - If the editor executable is renamed to a word starting with
r(or have a symlink with that name), the default theme will be red/black. - If the editor executable is renamed to a word starting with
l(or have a symlink with that name), the default theme will be suitable for light backgrounds. - If the editor executable is renamed to a word starting with
s(or have a symlink with that name), the default theme will be the "synthwave" theme. - Want to quickly convert Markdown to HTML? Try
o filename.md, pressctrl-spacetwice and quit withctrl-q. - The default syntax highlighting theme aims to be as pretty as possible with less than 16 colors, but it mainly aims for clarity. It should be easy to spot a keyword, number, string or a stray parenthesis.
- Press
ctrl-spaceorctrl-tto toggle the check mark in- [ ] TODO itemboxes in Markdown. - Orbiton is written almost exclusively in Orbiton, with some use of NeoVim for the initial development.
- Can load, edit and save gzipped text files or man pages that ends with a
.gzextension. - Can organize imports, for Java and for Kotlin, when formatting code with
ctrl-w. - Has a built-in spellchecker (press
ctrl-fand thentto search for a typo,ctrl-nfor next match and thenctrl-ato add it andctrl-ito ignore it). - Can jump directly to a selection of highlighted letters on the screen, when
ctrl-lis pressed.
- Some unicode runes may disrupt the text flow! This is generally not a problem for editing code and configuration files, but is an issue when editing files that contains text in many languages, or emojis.
- The man page viewer can not display some special characters, such as the long dash (—), just yet.
- Using
tmuxorscreenand resizing the terminal emulator window may trigger text rendering issues. Try pressingescto redraw the text, orctrl-fto search for text. SettingTERMcorrectly might help (but probably not). Usingzellijinstead oftmuxshould work. - For some terminal emulators, if
ois busy performing an operation, pressingctrl-smay lock the terminal. Some terminal emulators, likekonsole, can be configured to turn off this behavior. Pressctrl-qto unlock the terminal again (together with the unfortunate risk of quittingo). To sidestep this issue, thectrl-omenu can be used instead, for saving and quitting. - Using
moshmay cause text rendering issues (in bothnvimando). - Pressing
cmd-v,cmd-xandcmd-con macOS only works when using theogGUI/VTE frontend. Foro,ctrl-v,ctrl-xandctrl-ccan be used instead. - The Markdown table editor does not have scrolling, so the table must fit within the current terminal emulator width and height. Resize the terminal as needed.
There are pretty few hotkeys to remember:
ctrl-s- Save.ctrl-q- Quit.ctrl-r- Open or close a portal. Text can be pasted from the portal into another (or the same) file withctrl-v. For "git interactive rebase" mode (git rebase -i), this will cycle the rebase keywords instead.ctrl-a- Go to start of text, then start of line and then to the previous line.ctrl-e- Go to end of line and then to the next linectrl-n- Scroll down 10 lines, or go to the next match if a search is active. Insert a column when in the Markdown table editor. Jump to a matching parenthesis or bracket if the arrow keys were just used.ctrl-p- Scroll up 10 lines, or go to the previous match if a search is active. Remove an empty column when in the Markdown table editor. Jump to a matching parenthesis or bracket if the arrow keys were just used.ctrl-k- Delete characters to the end of the line, then delete the line.ctrl-_- Insert a symbol by typing in a 2-letter digraph. Try the--digraphsor-sflag to list all possible digraphs.ctrl-d- Delete a single character.ctrl-t- For C and C++: jump between the current header and source file. For Agda and Ivy, insert a symbol. For Markdown: toggle checkboxes, or launch the table editor if the cursor is over a table. For the rest: record and play back keypresses/"macros". PressEscto clear the current macro.ctrl-o- Open a command menu with actions that can be performed.ctrl-x- Cut the current line. Press twice to cut a block of text (to the next blank line).ctrl-c- Copy one line. Press twice to copy a block of text. Press thrice to copy the current function.ctrl-v- Paste one trimmed line. Press twice to paste multiple untrimmed lines.ctrl-space- Build program, render to PDF or export to man page (see table below). For Markdown: toggle checkboxes, or double press to export to HTML.ctrl-j- Join the current line with the next one.ctrl-u- Undo (ctrl-zis also possible, but may background the application).ctrl-l- Jump to a specific line number or percentage. Pressreturnto jump to the top. If at the top, pressreturnto jump to the bottom. Press one of the highlighted on-screen letters to jump to that location.ctrl-f- Search for a string. The search wraps around and is case sensitive. Presstabinstead ofreturnto search and replace. To find typos, search for the lettert, then pressctrl-nfor the next word,ctrl-ato add it orctrl-ito ignore it.ctrl-b- Jump back after jumping to a definition or include withctrl-g. Toggle a bookmark for the current line, or if set: jump to a bookmark on a different line.ctrl-w- Format the current file (see the table below), or cycle git rebase keywords. For Markdown, format the table under the cursor.ctrl-g- Jump to definition, for some programming languages (experimental feature), jump to an include, jump back or toggle the status bar.ctrl-\- Comment in or out a block of code.ctrl-~- Insert the current date and time.esc- Redraw everything and clear the last search.
- Press
ctrl-spaceto build or export the current file. - Press
ctrl-wto format the current file, in an opinionated way. If the current file is empty, a "Hello, World!" template will be inserted, for some file extensions. - If a build or export returns an error code and the status message is not specific enough, the last called command can be run from the command line with
$(o -l), to get more details.o -lcan be used to preview the command.
| Programming language | File extensions | Jump to error | Build command | Format command |
|---|---|---|---|---|
| Ada | .adb, .gpr, .ads, .ada |
WIP | WIP | WIP |
| Agda | .agda |
Yes | agda -c $filename |
N/A |
| ALGOL 68 | .a68 |
WIP | a68g --compile $filename |
WIP |
| Assembly | .asm, .s, .S, .inc |
Yes | yasm -f elf64 -o $output.o $filename |
N/A |
| C | .c, .h |
Yes | gcc $filename -o $output |
clang-format -i --style=WebKit $filename |
| C++ | .cpp, .cc, .cxx, .h, .hpp, .h++, .c++ |
Yes | g++ $filename -o $output |
clang-format -i --style=WebKit $filename |
| C# | .cs |
Yes | dotnet build $filename |
astyle --mode=cs $filename |
| C3 | .c3 |
Yes | c3c compile -o $output $filename |
c3fmt --rewrite $filename |
| Clojure | .clj, .cljs, .clojure |
WIP | lein compile $filename |
WIP |
| Crystal | .cr |
Yes | crystal build $filename --release |
crystal tool format $filename |
| CSS | .css |
WIP | No | prettier --tab-width 2 -w $filename |
| D | .d |
Yes | dmd $filename -of$output |
WIP |
| Dart | .dart |
Yes | dart compile exe --output $output $filename |
dart format $filename |
| Erlang | .erl |
Yes | erlc $filename |
WIP |
| Fortran77, Fortran90 | .f, .f90 |
Yes | gfortran -o $output $filename |
WIP |
| Garnet | .gt |
WIP | garnetc -o $output $filename |
WIP |
| GLSL | .glsl, .vert, .frag |
WIP | glslangValidator -V -o $output $filename |
WIP |
| Go | .go |
Yes | go build $filename |
goimports -w $filename |
| Hare | .ha |
Yes | hare build $filename |
N/A |
| Haskell | .hs |
Yes | ghc -dynamic $filename |
brittany --write-mode=inplace $filename |
| HTML | .html |
WIP | No | tidy -m $filename |
| Ivy | .ivy |
WIP | WIP | N/A |
| Java | .java |
Yes | javac + jar, see details below |
google-java-format -a -i $filename |
| JavaScript | .js |
WIP | No | prettier --tab-width 4 -w $filename |
| Jakt | .jakt |
WIP | jakt $filename |
WIP |
| Just | justfile, .justfile |
No | No | just --unstable --fmt -f $filename |
| Kotlin | .kt, .kts |
Yes | kotlinc $filename -include-runtime -d $output.jar |
ktlint -F $filename |
| Kotlin Native | .kt, .kts |
Yes | kotlinc-native -nowarn -opt -Xallocator=mimalloc -produce program -linker-option --as-needed $filename -o $output |
ktlint -F $filename |
| Lua | .lua |
Yes | luac -o $output.luac $filename |
lua-format -i --no-keep-simple-function-one-line --column-limit=120 --indent-width=2 --no-use-tab $filename |
| Markdown | .md |
WIP | No | prettier --write $filename |
| Nim | .nim |
WIP | nim c -o:$output $filename |
WIP |
| Objective-C | .m |
Yes | clang $filename -o $output |
clang-format -i --style=WebKit $filename |
| Odin | .odin |
Yes | odin build $filename |
N/A |
| Objective Pascal | .pas, .pp, .lpr |
Yes | fpc $filename |
WIP |
| OCaml | .ml |
WIP | No | ocamlformat $filename |
| Perl | .pl |
Yes | perl $filename |
/usr/bin/vendor_perl/perltidy -se -b -i=2 -ole=unix -bt=2 -pt=2 -sbt=2 -ce $filename |
| Python | .py |
Yes | python -m py_compile $filename |
black $filename |
| Ruby | .rb |
No | No | rubocop -A $filename |
| Rust (with Cargo.toml) | .rs |
Yes | cargo build |
rustfmt $filename |
| Rust | .rs |
Yes | rustc $filename |
rustfmt $filename |
| Scala | .scala |
Yes | scalac $filename && jar cfe $output MainClass *.class |
scalafmt $filename |
| Shell | .sh, PKGBUILD, APKBUILD |
WIP | makepkg |
shfmt -s -w -i 2 -bn -ci -sr -kp $filename |
| Standard ML | .sml, .fun, .mlb, .cm |
Yes | mlton $filename |
WIP |
| Swift | .swift |
WIP | WIP | WIP |
| TypeScript | .ts |
WIP | No | prettier --tab-width 4 -w $filename |
| V | .v |
Yes | v build $filename |
v fmt $filename |
| XML | .xml |
WIP | No | tidy -w 80 -q -i -utf8 --show-errors 0 --show-warnings no --tidy-mark no -xml -m $filename |
| Zig | .zig |
Yes | zig build-exe $filename |
zig fmt $filename |
/etc/fstab, JSON and HTML files are also supported, and can be formatted with ctrl-w.
owill try to jump to the location where the error is and otherwise displaySuccess.- For regular text files,
ctrl-wwill word wrap the lines to a length of 99. - If
kotlinc-nativeis not available, this build command will be used instead:kotlinc $filename -include-runtime -d $name.jar
CXX can be downloaded here: GitHub project page for CXX.
| File type | File extensions | Build or export command |
|---|---|---|
| AsciiDoc | .adoc |
asciidoctor -b manpage (writes to out.1) |
| scdoc | .scd, .scdoc |
scdoc (writes to out.1) |
| Markdown | .md |
pandoc -N --toc -V geometry:a4paper (writes to $filename.pdf) |
This is a brand new feature and needs more testing.
- If
gdbis installed, it's possible to select "Debug mode" from thectrl-omenu and then build and step through a program withctrl-space, or set a breakpoint withctrl-band continue withctrl-space. - Messages printed to stdout are displayed as a status message when that line is reached.
- An indication of which line the program is at has not yet been added, and is a work in progress.
- There are status messages indicating when the debug session is started and ended.
While in the Markdown table editor:
- Cells can be typed into.
- The arrow keys can be used to move around.
tabcan be used to go to the next cell, or insert new cells if the last cell is reached.returncan be used to either jump to the blank cell below or to insert a new row below.backspacecan be used to delete letters, but also for deleting the current row if it is empty.ctrl-ncan be used to insert a new column to the right.ctrl-dcan be used to delete the current column (if all cells in the column are empty).escorctrl-tcan be used to close the Markdown table editor.ctrl-scan be used to save.
Themes can be selected with the ctrl-o menu. The theme menu also lists the theme names, which can be specified in the O_THEME environment variable.
The O_THEME environment variable is an exception to the claim that o is configuration-free, but it is completely optional.
For using ie. the Synthwave theme, the /usr/bin/sw symlink to /usr/bin/o can be used, or this can be added to ~/.profile:
export O_THEME=synthwave
- To insert a symbol, like
æ, just pressctrl-_and type inae. To insertµ, type inMy. - These are the same digraphs as ViM uses.
- For a full overview of digraphs, see digraphs.txt.
git clone https://github.com/xyproto/orbiton
cd orbiton
make && sudo make install
And optionally:
make gui && sudo make gui-install
It is also possible to install the symlinks that are suggested further down in this document.
Install dependencies (use doas if needed):
add_pkg git gmake go vte3
Build both the editor o and the GUI frontend og:
gmake CXX="clang++ -w" o og
Install both executables, a man page, an icon and a desktop shortcut file (use doas if needed`):
PREFIX=/usr/local gmake install og-install
Just building and installing o also works:
gmake
doas gmake install
It is also possible to install the symlinks that are suggested further down in this document.
C++
- For building code with
ctrl-space,cxxmust be installed. - For formatting code with
ctrl-w,clang-formatmust be installed.
Go
- For building code with
ctrl-space, Thegocompiler must be installed. - For formatting code with
ctrl-w,goimportsmust be installed.
Zig
- For building and formatting Zig code, only the
zigcommand is needed.
V
- For building and formatting V code, only the
vcommand is needed.
Rust
- For building code with
ctrl-space,Cargo.tomlmust exist andcargomust be installed. - For formatting code with
ctrl-w,rustfmtmust be installed.
Haskell
- For building the current file with
ctrl-space, theghccompiler must be installed. - For formatting code with
ctrl-w,brittanymust be installed.
Python
ctrl-spaceonly checks the syntax, without executing. This only requirespythonto be available.- For formatting the code with
ctrl-w,blackmust be installed.
Crystal
- For building and formatting Crystal code, only the
crystalcommand is needed.
Kotlin
- For building code with
ctrl-space,kotlincmust be installed. A.jarfile is created if the compilation succeeded. - For formatting code with
ctrl-w,ktlintmust be installed.
Java
- For building code with
ctrl-space,javacandjarmust be installed. A.jarfile is created if the compilation succeeded. - For formatting code with
ctrl-w,google-java-formatmust be installed.
Scala
- For building code with
ctrl-space,scalacandjarmust be installed. A.jarfile is created if the compilation succeeded. - The jar file can be executed with
java -jar main.jar. Usescalac -d main.jar MyFile.scalaif you want to produce a jar that can be executed withscala main.jar. - For formatting code with
ctrl-w,scalafmtmust be installed.
D
- For building code with
ctrl-space,gdcmust be available.
JSON
- The JSON formatter is built-in. Note that for some files it may reorganize items in an undesirable order, so don't save the file if the result is unexpected.
fstab
- Formatting
fstabfiles (usually/etc/fstab) is a built-in feature. Just pressctrl-w. If you need a standalone utility,fstabfmtis available.
JavaScript
- For formatting JavaScript code with ,
prettiermust be installed.
Since kotlinc $filename -include-runtime -d builds to a .jar, I though I should do the same for Java. The idea is to easily compile a single or a small collection of .java files, where one of the files has a main function.
If you know about an easier way to build a .jar file from *.java, without using something like gradle, please let me know by submitting a pull request. This is pretty verbose...
javaFiles=$(find . -type f -name '*.java')
for f in $javaFiles; do
grep -q 'static void main' "$f" && mainJavaFile="$f"
done
className=$(grep -oP '(?<=class )[A-Z]+[a-z,A-Z,0-9]*' "$mainJavaFile" | head -1)
packageName=$(grep -oP '(?<=package )[a-z,A-Z,0-9,.]*' "$mainJavaFile" | head -1)
if [[ $packageName != "" ]]; then
packageName="$packageName."
fi
mkdir -p _o_build/META-INF
javac -d _o_build $javaFiles
cd _o_build
echo "Main-Class: $packageName$className" > META-INF/MANIFEST.MF
classFiles=$(find . -type f -name '*.class')
jar cmf META-INF/MANIFEST.MF ../main.jar $classFiles
cd ..
rm -rf _o_buildFor Scala, this is the code that is used to produce a main.jar file that can be run directly with java -jar main.jar:
#!/bin/sh
scalaFiles=$(find . -type f -name '*.scala')
for f in $scalaFiles; do
grep -q 'def main' "$f" && mainScalaFile="$f"
grep -q ' extends App ' "$f" && mainScalaFile="$f"
done
objectName=$(grep -oP '(?<=object )[A-Z]+[a-z,A-Z,0-9]*' "$mainScalaFile" | head -1);
packageName=$(grep -oP '(?<=package )[a-z,A-Z,0-9,.]*' "$mainScalaFile" | head -1);
if [[ $packageName != "" ]]; then
packageName="$packageName."
fi
mkdir -p _o_build/META-INF
scalac -d _o_build $scalaFiles
cd _o_build
echo -e "Main-Class: $packageName$objectName\nClass-Path: /usr/share/scala/lib/scala-library.jar" > META-INF/MANIFEST.MF
classFiles=$(find . -type f -name '*.class')
jar cmf META-INF/MANIFEST.MF ../main.jar $classFiles
cd ..
rm -rf _o_build- If
/usr/share/scala/lib/scala-library.jaris not foundscalac -d run_with_scala.jaris used instead. - If
scala-library.jarwas not found, then the resultingjarfile will needscalato run.
ctrl-t brings up a menu with a selection of special symbols.
There are also these shortcuts:
- Insert
⊤by pressingctrl-tand thent. - Insert
ℕby pressingctrl-tand thenn.
When editing PKGBUILD files, it is possible to press ctrl-o and select Call Guessica to update the pkgver= and source= fields, by a combination of guesswork and online searching. This functionality depends on the Guessica package update utility being installed, and will only work for some PKGBUILD files.
a68g- for compiling ALGOL 68 codeagda- for compiling Agda codeasciidoctor- for writing man pagesastyle- for formatting C# codeblack- for formatting Python codebrittany- for formatting Haskell codecargo- for compiling Rustclang- for formatting C++ code withclang-formatclojure- for compiling Clojurecrystal- for compiling Crystalcxx- for compiling C++fpc- for compiling Object Pascalg++- for compiling C++ codegdc- for compiling D codeghc- for compiling Haskell codego- for compiling Go codego-tools- for formatting Go code and handling imports withgoimportsgoogle-java-format- for formatting Java codejad- decompile.classfiles on the fly when opening them withojava-environment- for compiling Java code and creating.jarfiles withjavacandjarkotlin- for compiling Kotlinktlint- for formatting Kotlin codelua- for compiling Lua to bytecodelua-format- for formatting Lua codemlton- for compiling Standard MLmono- for compiling C# codeocaml- for compiling and formatting OCaml codeodin- for compiling Odinpandoc- for exporting Markdown to PDFprettier- for formatting JavaScript, TypeScript and CSSpython- for compiling Python to bytecoderustc- for compiling Rustrustfmt- for formatting Rustscala- for compiling Scalasdoc- for writing man pagestidy- for formatting XMLv- for compiling and formatting V codezig- for compiling and formatting Zig code
- The
oexecutable is 1.5M when built with GCC 12 (for 64-bit Linux) and compressed withupx. - This isn't as small as e3, an editor written in assembly (which is 234k), but it's reasonably lean.
One way of building with gccgo and upx (in the v2 directory):
go build -mod=vendor -gccgoflags '-Os -s' -o o && upx --best --lzma o
If the o executable is built with go instead, the size can be 8.7M, or just 2.8M when packed with upx:
go build -mod=vendor -ldflags='-s -w' -trimpath -o o && upx --best --lzma o
These four ways of opening file.txt at line 7 are supported:
o file.txt 7o file.txt +7o file.txt:7o file.txt+7
This also means that filenames containing + or :, and then followed by a number, are not supported.
-fcan be used to open a file, regardless of if there are any locks. It can also be used for overwriting files together with-p.-c FILENAMEcan be used to copy the contents of the given file to the clipboard and then exit.-p FILENAMEcan be used to paste the contents of the clipboard to the givenFILENAME(if it does not already exist) and then exit.-ncan be used to avoid writing lockfiles, build files, location history, search history and the game highscore to$XDG_CACHE_DIR/cache/oor~/.cache/o. Not recommended.-mcan be used to open a file as read-only, but monitor it for changes.--helpcan be used to get a quick overview of the supported keybindings. It will also list additional supported flags.--versionwill print the current version and then exit.
When loading files that are large or from a slow disk, an animated spinner will appear. The loading operation can be interrupted by pressing esc, q or ctrl-q.
This shell function works in zsh and bash and may be useful for both searching for and opening a file at the given line number (works best if there is only one matching file, if not it will open several files in succession):
fo() { find . -type f -wholename "*$1" -exec o {} $2 \;; }If too many files are found, it is possible to stop opening them by selecting Stop parent and quit without saving from the ctrl-o menu, which will quit the editor and also kill the parent find process.
Example use:
fo somefile.cpp 123It is also possible to run a case-insensitive file search and open up the first match with, where "omfile" is a case-insensitive substring of the found filename:
o omefileWhen using pandoc to export from Markdown to PDF:
- If the
PAPERSIZEenvironment variable is set to ie.a4orletter, it will be respected when exporting from Markdown to PDF using pandoc, at the press ofctrl-space. - The
--pdf-engine=xelatexand--listingsflags are used, soxelatexand thelistingspackage needs to be available. A standard installation of LaTeX and Pandoc should provide both. Render to PDF with pandocwill only appear on thectrl-omenu when editing a Markdown file andpandocis installed.
- Press the Konami code keys while in the
ctrl-omenu to start a silly little game about feeding creatures with pellets before they are eaten. Alternatively, create a symlink for starting it directly, ie.:ln -sf /usr/bin/o /usr/bin/feedgame. - Press
right, down, leftorleft, down, rightin rapid succession followed by eitherdownto save orupto save and quit. The only purpose of this unusual shortcut is to help avoid the painful Emacs pinky.
o- for terminal emulators that supports at least VT100og- for the VTE GUI (optional)
# For starting o with the Light theme
ln -sf /usr/bin/o /usr/bin/li
# For starting o with the Red/Black theme
ln -sf /usr/bin/o /usr/bin/redblack
# For starting o with the Synthwave theme
ln -sf /usr/bin/o /usr/bin/sw
# For starting o with the Blue Edit theme
ln -sf /usr/bin/o /usr/bin/edi
# For starting o with the Light VS theme
ln -sf /usr/bin/o /usr/bin/vs# For starting the GUI version of o with the Light theme
ln -sf /usr/bin/og /usr/bin/lig
# For starting the GUI version of o with the Red/Black theme
ln -sf /usr/bin/og /usr/bin/redblackg
# For starting the GUI version of o with the Synthwave theme
ln -sf /usr/bin/og /usr/bin/swg
# For starting the GUI version of o with the Blue Edit theme
ln -sf /usr/bin/og /usr/bin/edg
# For starting the GUI version of o with the Light VS theme
ln -sf /usr/bin/og /usr/bin/vgBuild:
make gui
Install (use sudo or doas, if needed):
make gui-install
- Press
ctrl-fto search, and then type intand press return to search for the next typo. - If a typo is found, press
ctrl-ato (temporarily) add it to the dictionary orctrl-ito (temporarily) ignore it. - The spellchecker uses a fixed English word list and does not store lists of custom words anywhere, yet.
- When in Nano mode (when
ois launched by a symlink or executable namednanornano),ctrl-tsearches for the next typo. - The spellchecker is an experimental feature.
The built-in spellchecker uses a list of words from this project that is licensed under this MIT license:
MIT License, Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Orbiton passes the Moby Dick Workout here on my machine.
- Please create an issue if it is even a little bit slow on your machine (as long as your machine is at least as fast as a Raspberry Pi 3).
- Kitty with the "Glacier" theme works well together with Orbiton.
- Untick the
Flow controloption in the profile settings, to ensure thatctrl-swill never freeze the terminal.
- An orbiton is a quasiparticle.
- Version: 2.70.2
- License: 3-clause BSD
- Author: Alexander F. Rødseth <[email protected]>