Skip to footer navigation.

« Oatmeal


Acme is a text editor and programming environment from Plan9. I typically use the version provided by plan9port.

Screenshot of the acme text editor. There are a number of panes open in the window, including some bash script, a list of the contents in a directory, and a blank shell.

Unlike vim and emacs, the user interface of acme is structured around using a multi-button pointing device, like a mouse. To take full advantage of acme you need 3 mouse buttons:

On a mac with a touch pad:

The interface includes a handful of persistent button-like text that you can use to preform various tasks and actions.

Label Description
Newcol create a new column.
Delcol delete a column.
New create a new window.
Put write the body to disk. The file is the one named in the tag.
Get refresh the body.
Zerox creates another instance of the active window.
Snarf sort of like copy” but a little different.
Paste normal paste.
Exit quit

For me, the most wonderful thing about acme, though, is that it lets you run programs directly in the editor — need to grep through a directory? Write the snippet in the editor itself and use button 2 to execute the text!

Of note, I pretty much never summon acme by calling the program directly. Instead, I use a wrapping script like this one.

#!/bin/zsh -e

export SHELL="$PLAN9/bin/rc"
export acmeshell="$PLAN9/bin/rc"
export BROWSER=safari
export tabstop=4
export TERM=dumb
export PAGER=nobs

# Path to 'a' script itself
# I usually put this script in $PLAN9/bin
acme_bin_dir=$( cd $(dirname $0) && pwd )

# Where are the plumber rules?
# acme_plumber_rules="$acme_bin_dir/../plumbing"
# No custom plumbing rules right now

if [ "$(pgrep plumber)" ]; then
    echo plumber is running
    echo starting plumber
    cat "$acme_plumber_rules" "$PLAN9/plumb/basic" | 9p write plumb/rules

# for those times you wanna make node play nice with acme

acme -a -f /mnt/font/GoMono/16a/font $1

This makes sure plumber is running, and starts it if it isn’t; grabs any custom plumber settings; makes sure acme is sourcing some default plumber stuff; and starts up with a larger than normal font so that I can read stuff. Also, a bit of sacrilege, I use a fixed width font in acme. Traditionally acme uses a proportional font.

I’ve found that acme’s win command really only plays nice with the rc shell, so, I keep that configured for it.

Two things I keep in my .rcrc config file,

fn la { ls -A $* }
fn ll { ls -l $* }

And a useful way to quickly open a file that you know is somewhere in the directory you are currently in, or lower, without having to go spelunking all the way down:

du -a | grep 'name-of-file'

du -a will last all files and directories, grep finds your pattern. Who even needs a command palette when you’ve got unix goodness?

Other resources

rc shell stuff


Because the interaction model that acme expects is a little different from the text editors most folks are used to, I think videos offer some of the quickest insights into how to use it.

Stuff to check out

This is a collection of stuff I intend to take for a spin, but that I haven’t had a chance to explore, yet.