Home

Awesome

Orbiton Logo

Build FOSSA Status Go Report Card License

Orbiton is a text editor and a simple IDE with the following goals in mind:

Please submit a PR if anything can be improved to help reach these goals.

Orbiton might be a good fit for:

Screenshots

Screenshot of the VTE GUI application (that can be found in the gtk3 directory), running the o editor:

screenshot

Stepping through the assembly instructions of a Rust program by entering debug mode with the ctrl-o menu and then stepping with ctrl-n:

debug rust

Editing a C source file in og using the "synthwave" theme:

synthwave theme

There are also light themes available:

vs theme

light theme

Packaging status

orbiton
Packaging status

Quick start

With Go 1.21, 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.68.2/orbiton-2.68.2-linux_armv7_static.tar.xz' | tar JxC /tmp && sudo install -Dm755 /tmp/orbiton-2.68.2-linux_armv7_static/o /usr/bin/o && sudo install -Dm644 /tmp/orbiton-2.68.2-linux_armv7_static/o.1.gz /usr/share/man/man1/o.1.gz

Setting o as the default editor executable for git

To set:

git config --global core.editor o

To unset:

git config --global --unset core.editor

Viewing man pages

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'

Setting up o on OpenSUSE

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.

Unique features

These features are unique to o, as far as I am aware:

Other features and limitations

Known issues

Hotkeys

There are pretty few hotkeys to remember:

Build and format

Programming languageFile extensionsJump to errorBuild commandFormat command
Ada.adb, .gpr, .ads, .adaWIPWIPWIP
Agda.agdaYesagda -c $filenameN/A
ALGOL 68.a68WIPa68g --compile $filenameWIP
Assembly.asm, .s, .S, .incYesyasm -f elf64 -o $output.o $filenameN/A
C.c, .hYesgcc $filename -o $outputclang-format -i --style=WebKit $filename
C++.cpp, .cc, .cxx, .h, .hpp, .h++, .c++Yesg++ $filename -o $outputclang-format -i --style=WebKit $filename
C#.csYesdotnet build $filenameastyle --mode=cs $filename
C3.c3Yesc3c compile -o $output $filenamec3fmt --rewrite $filename
Clojure.clj, .cljs, .clojureWIPlein compile $filenameWIP
Crystal.crYescrystal build $filename --releasecrystal tool format $filename
CSS.cssWIPNoprettier --tab-width 2 -w $filename
D.dYesdmd $filename -of$outputWIP
Dart.dartYesdart compile exe --output $output $filenamedart format $filename
Erlang.erlYeserlc $filenameWIP
Fortran77, Fortran90.f, .f90Yesgfortran -o $output $filenameWIP
Garnet.gtWIPgarnetc -o $output $filenameWIP
GLSL.glsl, .vert, .fragWIPglslangValidator -V -o $output $filenameWIP
Go.goYesgo build $filenamegoimports -w $filename
Hare.haYeshare build $filenameN/A
Haskell.hsYesghc -dynamic $filenamebrittany --write-mode=inplace $filename
HTML.htmlWIPNotidy -m $filename
Ivy.ivyWIPWIPN/A
Java.javaYesjavac + jar, see details belowgoogle-java-format -a -i $filename
JavaScript.jsWIPNoprettier --tab-width 4 -w $filename
Jakt.jaktWIPjakt $filenameWIP
Justjustfile, .justfileNoNojust --unstable --fmt -f $filename
Kotlin.kt, .ktsYeskotlinc $filename -include-runtime -d $output.jarktlint -F $filename
Kotlin Native.kt, .ktsYeskotlinc-native -nowarn -opt -Xallocator=mimalloc -produce program -linker-option --as-needed $filename -o $outputktlint -F $filename
Lua.luaYesluac -o $output.luac $filenamelua-format -i --no-keep-simple-function-one-line --column-limit=120 --indent-width=2 --no-use-tab $filename
Markdown.mdWIPNoprettier --write $filename
Nim.nimWIPnim c -o:$output $filenameWIP
Objective-C.mYesclang $filename -o $outputclang-format -i --style=WebKit $filename
Odin.odinYesodin build $filenameN/A
Objective Pascal.pas, .pp, .lprYesfpc $filenameWIP
OCaml.mlWIPNoocamlformat $filename
Perl.plYesperl $filename/usr/bin/vendor_perl/perltidy -se -b -i=2 -ole=unix -bt=2 -pt=2 -sbt=2 -ce $filename
Python.pyYespython -m py_compile $filenameblack $filename
Ruby.rbNoNorubocop -A $filename
Rust (with Cargo.toml).rsYescargo buildrustfmt $filename
Rust.rsYesrustc $filenamerustfmt $filename
Scala.scalaYesscalac $filename && jar cfe $output MainClass *.classscalafmt $filename
Shell.sh, PKGBUILD, APKBUILDWIPmakepkgshfmt -s -w -i 2 -bn -ci -sr -kp $filename
Standard ML.sml, .fun, .mlb, .cmYesmlton $filenameWIP
Swift.swiftWIPWIPWIP
TypeScript.tsWIPNoprettier --tab-width 4 -w $filename
V.vYesv build $filenamev fmt $filename
XML.xmlWIPNotidy -w 80 -q -i -utf8 --show-errors 0 --show-warnings no --tidy-mark no -xml -m $filename
Zig.zigYeszig build-exe $filenamezig fmt $filename

/etc/fstab, JSON and HTML files are also supported, and can be formatted with ctrl-w.

CXX can be downloaded here: GitHub project page for CXX.

File typeFile extensionsBuild or export command
AsciiDoc.adocasciidoctor -b manpage (writes to out.1)
scdoc.scd, .scdocscdoc (writes to out.1)
Markdown.mdpandoc -N --toc -V geometry:a4paper (writes to $filename.pdf)

Debug support for C and C++

This is a brand new feature and needs more testing.

Markdown table editor

While in the Markdown table editor:

Themes

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

Inserting a symbol

Manual installation on Linux

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.

OpenBSD installation instructions

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.

Dependencies

C++

Go

Zig

V

Rust

Haskell

Python

Crystal

Kotlin

Java

Scala

D

JSON

fstab

JavaScript

Java

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_build

Scala

For 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

Agda

ctrl-t brings up a menu with a selection of special symbols.

There are also these shortcuts:

Updating PKGBUILD files

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.

List of optional runtime dependencies

Size

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

Jumping to a specific line when opening a file

These four ways of opening file.txt at line 7 are supported:

This also means that filenames containing + or :, and then followed by a number, are not supported.

Flags

Spinner

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.

progress

Find and open

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 123

Pandoc

When using pandoc to export from Markdown to PDF:

Easter eggs

Included executables

Recommended symlinks

# 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/vg

The GUI/VTE frontend og

Build:

make gui

Install (use sudo or doas, if needed):

make gui-install

Spellchecker

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 <sindresorhus@gmail.com> (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.

Moby Dick Workout

Terminal settings

Konsole

About the name

License scan

FOSSA Status

Stars

Stargazers over time

General info