Shared publicly  - 
The text editor I write programs with. Comments here appear on the blog post.
People I work with recognize my computer easily: it's the one with nothing but yellow windows and blue bars on the screen. That's the text editor acme, written by Rob Pike for Plan 9 in the early 1990...
Yi's profile photoFinn Roach (pls)'s profile photo黄琦峰's profile photojordi collell's profile photo
the button click events showing up is a nice touch. +Russ Cox Do you still have the code for doing that around somewhere?
So mouse-oriented for a text editor. How can it be used on a MacBook Air with no mouse but only a touchpad with one button?
+Stephen Gantenbein It can work to some extent, I've done it, but you can't do mouse chording.

Acme is the reason I tend to stick with either a Thinkpad (eraser mouse + 3 buttons) or an old rolling-ball mouse from the long-gone age when they built mice with 3 real buttons.
Not bad at all… i think i'll stick with vim for now, but this editor indeed has a lot of merits!
How would you go about installing Plan 9 on a MacBook Air, if at all possible? I suppose Parallels is an option? The last laptop I had running it was a ThinkPad T20, I believe, and I'd like to get back into it...
+Alexander Yngling I probably wouldn't bother trying to install it natively; I went through enough hell just trying to install Linux on one. Plan 9 runs fine in VirtualBox on OS X, I've used it like that.
+Stephen Gantenbein +John Floren On a 1-button Mac laptop, option-click is button 2 and command-click is button 3. I had to experiment to write that sentence: my fingers know what to do and I don't even think about it anymore. Chording works too: or example, copy is hold down mouse button, highlight, type option, type command, let go of mouse button. But we made option-X,C,V work a while back and they're certainly more convenient in that environment.
+Alexander Yngling - Read the post. "If you use FreeBSD, Linux, OS X, or most other Unix clones, you can get it as part of Plan 9 from User Space."
+Alexander Yngling To get the full Plan 9 operating system, I would expect VMware and Parallels to work. I have not tried it in a long time but I'm sure would be happy to help you.
+John Floren, +Stephen Gantenbein  mouse chording works fine in a macbook with option and command keys as buttons 2 and 3. a 1-2-3 chord is accomplished by selecting text with the pad button pressed and executing clicks on option and command sequentially. 

the 2-1 chord is the only one that does not work out-of-the-box. there was work that made the top of the mouse pad act as buttons 1-2-3 too. i don't know if that's enabled by default.
Rob Pike
What Russ doesn't stress enough is the major thing Acme brought, beyond what it borrowed from Oberon etc.: the contextual right click. One button click gets what I want, be it the next appearance of a word, the line the compiler's complaining about, a man page, a PDF file, a UPS delivery notice, whatever. If the data's here, jump the mouse to the location (another thing Russ didn't point out) and highlight it. If it's not there, load it and jump to it.

One click, context-driven. It's hard to appreciate how powerful and effective that is without trying it.
+Russ Cox Thank you, I was indeed thinking about the full system.
+John Floren That is certainly good advice :) Thanks for the tip on VirtualBox.
+Tim Pierce  Thanks for your comment, but I meant the entire system, not just Acme.
+Alexander Yngling sorry for not reading your request more carefully. Like +John Floren I was able to get Plan 9 running in VirtualBox on OS X without much trouble (though I have not exercised it very hard).

I can't count the number of times I've said over the last 25 years "that as done [better] in Plan 9".
Interesting editor, but lack of syntax highlighting for code disappoints
+Aliaksandr Zhaunerchyk I find that I don't miss it, but that may just be a taste thing. I also typically disable it in vim. Maybe a combination of my language choice and the way I write code, leading to a situation where I don't find highlighting useful?
wow ..heard about it a few times but never realy saw any screencast.
this realy is powerful!!
I had been using Sam for a while and I like that.  I had also tried Acme but the experience was not successful.  Having no enough `standard' scripts may be a reason.
+Sergio Perticone the canonical answer would be "sources", but that's inconvenient for non-Plan 9 users. A Google Group, maybe "acmefans", could be a way to do it--you get discussion and the submissions will be archived for you, not subject to loss whenever some guy's Amazon instance dies.
Didn't realize WMII has been inspired by more than just 9p :-)
Can I use truetype fonts with acme editor? If I can, I'll try acme for a while :-)
+류인상 In Plan 9 from User Space there is a program called fontsrv that converts installed fonts on the Mac to the bitmap format needed by the Plan 9 tools. So you can, for example, run acme -f /mnt/font/ComicSansMS/16a/font to use 16-point anti-aliased Comic Sans as your font.

It is probably not hard to make work on X11 too - the system-specific stuff is well isolated - but I haven't had the time or the need to do it.
Rob Pike
Little-known story.

When I started working on Acme, I had a pretty strong idea about what it would be and what it would look like, but I didn't have a name yet. As I usually did at the time, on Friday night I went to Times Square for Movie Night.  +Penn Jillette was there, and I told him I needed a name for my new project.

"What does it do?" he asked.

"Umm... Everything." I said.

"Acme," said Penn, and laughed.

And that was it.
Self-homage really sucks. Acme is mixing up too many layers of interaction – it's the emacs of Plan 9. Instead its tiling is the way to go for window management in which many sam windows would run. To these windows the »magic context-sensitive (cloud-based?)« right click would be exposed by a small fileserver (API).

Sam and ed are easy to understand and there is no need for a screencast or self-praising hippiedom.
+Christoph Lohmann, the interesting underlying suggestion of tiling WM, sam, and right-click FS may garner more discussion with a lighter tone. :-)
I wonder how long it takes to get used to working with the mouse. Any recommendations for a sane 3-button mouse (with a real middle button, not a scrollwheel)?
+Christoph Lohmann So instead you're going to have non-productive discussions?

I love acme, but I've had to stop using it because (under Ubuntu) my ThinkPad treats the middle button as a scroll wheel and won't let me select text with it. Is there a way around this?
+Anschel Schaffer-Cohen Yes there is. I don't have my thinkpad right now (I can tell you more about it later), but I believe I managed to have a setup with both the wheel with the trackpoint and no hindrance to chording. Maybe some tweaking in gpointing-device-settings was all that was needed.
+Rob Pike, have you worked on Oberon itself, by any chance?  BTW, are there reports of successful injection attacks against acme? ;-)
Interesting editor, and very informative video. The lack of syntax highlighting is a con, though, IMHO. 
+Anschel Schaffer-Cohen I use acme under Ubuntu. I had no problem with the middle button (it's a scroll wheel and a mouse button) but I did have to remap the Alt key so that it didn't raise the HUD, so I could enter non-ASCII characters.
+Rob Pike Interesting. I always assumed it was something to do with the name being a near-pun of Emacs.
+Anschel Schaffer-Cohen study xinput command. here's the script that i use with my "thinkpad" keyboard (an actual USB keyboard); in my setup, the id for pointer device is "9".

#! /bin/bash
xinput --set-prop 9 "Evdev Wheel Emulation" 0
xinput --set-prop 9 "Evdev Middle Button Emulation" 1
I've installed AcmeSAC-0.31 on my Mac. I see that within the app. package Contents/Resources/appl, there are lots of .b text files; I guess they are Limbo source files. I'd be surprised if this AcmeSAC contains any Limbo compiler or interpreter. Does it?
AcmeSAC is essentially Inferno, and it does indeed contain the Limbo compiler. The version of Acme in inferno is actually an earlier port of the Alef version acme from before Acme itself was ported to C.
How do I send some code from a code window to a repl running in win? Button 2 on the code in the original buffer attempts to run it in rc. Button 2 on Send in the win window attempts to run 'plan9port'.
+Vincent Murphy  Button 2 on any text in the win window Sends the text that's clicked on (it seems you b2 clicked on the word "plan9port"). In general, if you want to transfer text between two windows, cut and paste it. The win window is no exception - paste after the "insertion point" (the last thing the shell has printed) and the text will go to the shell.
+roger peppe Nope, that's just a happy accident. There are clues in the source.
fsys.c:109: char *user = "Wile E. Coyote";
Is it fair to say acme:sam :: emacs:vi?  At least that's the sense I get from some of the discussion above (including the not-sure-if-he's-serious flamer guy's tone).  I had no idea there were holy wars within the Plan-9 universe!

(Indeed, Wikipedia claims: "Sam vs. acme editor wars occur in the Plan 9 community (both are shipped with Plan 9) although both stem from a similar aesthetic bias. Both were written by Rob Pike.")

Syntax highlighting is n.b.d. but I worry about bitmap fonts!  I guess I should see what port options are available.
+Daniel Egnor Sam and acme have the same command language, so your analogy isn't sound. They even share a lot of code, especially at the file-management and database (sic) layer. They're two different UIs and two different system models.

I still use both. Acme when I'm near the files and sam (actually sam -r remotehost) when I'm not. Nothing I've seen since can touch the responsiveness of editing with sam -r when the Pacific Ocean lies between me and my files. It turns out that designing something to work well over 1200 baud dialup serves as a good foundation for coping with light time between Asia and North America.
+Daniel Egnor, fontsrv, that +Russ Cox mentions above, serves anti-aliased fonts too, as he said, so they're not strictly bitmap, more greymap.
+Russ Cox  I'm interested that you too use a+ and a-. Did we invent those commands independently? That would be very cool.
Computers don't have to be oceans away to take advantage of the responsiveness of sam -r.  I got sick of the twitchiness of vi over ssh and remembering Russ' usesthis post ( I use:

font=$samfont sam -a -r pi@$piaddr-s "cd $wd; $remotesam"

to edit between my Mac and Raspberry Pi:
This looks really nice. A bit heavy on the mouse usage, but I am impressed by the way acme can be controlled through the file system.
+Rob Pike It turns out that designing something to work well over 1200 baud dialup serves as a good foundation for coping with light time between Asia and North America.

As I recall, Bill Joy commented that a lot of his work on vi was intended to produce something usable as a full-screen editor when your terminal connected via a dialup 300 baud modem to the host, with lots of hacking to optimize the display code to write only what was necessary to the terminal when updates were done, and a command set intended to minimize what you had to type to do editing.

It makes me wonder what vi might have looked like had GUIs and mice been in the picture back then.
+Russ Cox Are the scripts used in the video available somewhere for download? I went slightly insane following along at the 20 minute mark until I realized 'Watch' was not an Acme builtin...
+roger peppe Thanks! Took me a moment to realize that was an instruction for the computer rather than an instruction to me, though. :-)
Additional stuff: The a+ and a- commands are at least given here by +roger peppe:

though unicode is garbled, and you may also need to fix the path from #!/bin/rc. I couldn't find any more specific place. All of +Russ Cox's /p/rsc directory is also worth looking at: It tells the story of how to work with acme. You basically create lots of small tools in any language you like to work in and then you tie them together via the integrating interface of acme.

Yes, it contains xmpp clients, issue tracking, gmail integration and whatnot if you peek in there :)
Using sam -r host, how do you write the remote machine address if ssh server is listening on a port different from 22?
+Giovanni Casano There's no option to pass that through to ssh from sam's command line, but you can always edit .ssh/config to create a named host with whatever settings are appropriate. Once 'ssh host' works, 'sam -r host' will work too.
First, thanks for the notes in this thread by -
+roger peppe +Russ Cox  and +Rob Pike 

I appreciate that %C %V and %Z work for copy, paste, undo... but do not see a %S for save.  Do you find it easy to live without that?  I tend to save very often while editing text.

I naively added some code to text.c which seems to work - enabling %S for 'Put' ... look good?

@@-749,6 +749,10 @@
  cut(t, t, nil, TRUE, FALSE, nil, 0);
+ case Kcmd+'s': /* %S: save */
+ typecommit(t);
+ put(t, nil, nil, XXX, XXX, nil, 0);
+ return;
  case Kcmd+'z': /* %Z: undo */
  undo(t, nil, nil, TRUE, 0, nil, 0);

My innocent first guess had t->w->body as the first param to put(), but that bombed.  

Other things which I noticed in the first few minutes of editing :

1) Autoindent? 
2) Autocomplete (for Go code in particular)?
3) Based on some other notes I found, I changed acme.c and draw.h so I now have a nice grayscale color scheme that I like instead of the default colors.
4) I haven't gotten it tied into the filesystem using FUSE, any docs on how to do that on a Mac?

I'm not yet a convert from vim, but I love the way the environment integrates with external tools - the output appearing in new windows, clicking on errors from the complier to get to the source code, etc.  Everything ties together nicely.
I’d like to know how to get FUSE to work on OS X too.

% 9 mount `namespace`/acme /mnt/acme
top level name fuse in fuse.version is invalid
top level name macfuse in macfuse.version.number is invalid
don't know how to mount (no fuse)
Autoindent can be had by 'Indent on' or starting acme(1) with the -a option.

Autocomplete is not there. Often, I've found that the completion can be had by a bit of copy/paste work. And the mouse is fast for doing this when you learn how to use it. I am not sure I am too much of a fan of autocomplete though. The languages in which you need completion tend to be languages I don't want to keep on working with :) I also have a hunch it depends on fast a typer you are. I, for instance, rarely did autocompletion in Emacs because by the time I had hit the keyboard combination, my fingers would already have typed something like 10 characters ahead.
FUSE for the Mac can be installed from

I'm working on a set of annotations for Russ' talk to help bridge the gap for a completely new user to the environment. I've been rounding up a lot of bits and pieces and trying to get it into a coherent whole.
Very nice screencast. I always wanted to give acme a try but never got to it in the end. I have some problem though on OS X with arrow UP/DOWN moving the buffer instead of moving the cursor one line up or down. Is there a way to get this behavior ? 
Hey Russ: Is there a way to get two acme windows going in OS X, or better yet: one that spans a couple of displays?
+Petar Maymounkov 

#!/usr/bin/env rc -l
NAMESPACE=`{mktemp -d /tmp/acme.XXXXXX} || exit
if(test -e $main/factotum)
        ln -s $main/factotum $NAMESPACE
plumber=`{pgrep -n plumber} # racey
acme -a $*
kill $plumber
using fontsrv on the Mac .. many fonts work fine, but my favorite (and a couple of others) get this error...  am I out of luck trying to use Inconsolata?

$ acme -a -f /mnt/font/Inconsolata/14a/font hello.go
imageinit: can't open font /mnt/font/Inconsolata/14a/font: bad height or ascent in font file
acme: can't open display: bad height or ascent in font file

Available here:
You could just try Consolas, it works and is similar.
+Jason Mader  Yes, I know - that was once my font, but it's not the same... I like DejaVuSansMono and DroidSansMono as well (which also work).. but, not as much as Inconsolata.  I tried proportional fonts as well, but it just doesn't do it for me when programming.  I can get by without it, but am still hopeful.  Like many programmers, I've tried every font under the sun, and when you finally get something you like, it's hard to switch.
Hello everyone, is there a good way to do 2-1 chord on a macbook touchpad?  
That's actually an interesting design question: can the power of chording be adapted to be useful on touchpads and/or touchscreens?
+Don Dwoske I can't reproduce that failure. What does "fontsrv -p Inconsolata/14a/font" print?
Great screencast... I installed acme a while ago to play with it, but fumbling around on my own didn't really showcase the editor and what it could do as well as watching a seasoned vet do the same.  Thanks!  

I'm still partial to the keyboard, and never leaving the home-row, so ACME may be a bit too mouse-intensive for my tastes.  But I definitely like the way it can act on any text in  different contexts.  There's some really useful stuff there. 
Acme is interesting, but as many others have said, I'm way too used to Emacs and to give it up.  That said, a few things would probably be worth stealing (or at least worth implementing as an Emacs mode): the window management with the mouse is certainly easier and faster in Acme than in Emacs, so that would probably be a win.  An easier way to insert the output of either a shell command or Elisp expression into a buffer would be great too.  Duplicating the addressing syntax is another thing that could make some users happy.

Quick question about Acme's search; how do you search for a filename inside a file?  For instance, if I want to find all places that "index.html" is referred but don't want to open the actual index.html file.  How would one do that?
+Vincent Foley You execute 'Look index.html'. (That's why Look is sitting there in the tag.)
first try of ACME today, quite impressed (from a vim & emacs user). quick Question: is it possible to change font size on in ACME? I did man font {mid button to run), but still not clear how to change the font ... thanks
to me the great strength of ACME is the unification everything around text (to a lesser degree mouse clicks). it is like supercharged wiki. If we implement such a 'wiki' engine in emacs, it might be interesting, though we would not get the unified layer such as in ACME
the unification everything around text (to a lesser degree mouse clicks)

I haven't actually used ACME, but from what I understand of it I would guess the power comes from how the two combine. Everything resolves around text (kind of like, if not exactly like, the "code is data" mantra), but it is the mouse that does the resolving, giving you power to communicate to the computer how to interpret this content.
Is there port of default rio/acme font to ttf? I want to use it in XCode :)
+Semka Novikov The current Lucida Sans and Lucida Sans Typewriter are very close.
I recently started experimenting with acme and I'm liking it very much so far.

Is it possible to overrule a load rule based on the file in the tag? I have this idea of having the load button become a shortcut for godoc when the file tag is a go file.

I did an experiment with the event file, but it seems like the tag stops acting as if the window is a file image when the event file is open.
You can write a custom plumbing rule. For a while I had a plumbing rule for clicking on things like 'strings.Join', but I found that too often it got in the way of searches in the text of the file YMMV of course. Edit $HOME/lib/plumbing (copy $PLAN9/plumb/ to start) to experiment.
+Gregory Gelfond I use acme for hours every day. If something's wrong, I fix it. It's not adding new features very often, but it is certainly maintained.
I sit and use it for at least 6 hours a day as well. I had the plan of improving the anti-aliasing support for Linux/X11 but then I looked at Freetype and shuddered. I am now happy with Bigelow&Holmes fonts :P

Note that acme is created such that you use UNIX/Plan9 commands quite often. That is, you extend your environment and acme ties it together. So there is a lot less reason to extend acme all the time.
+Jesper Louis Andersen Freetype support for fontsrv went in recently. If you sync + rebuild it should be there (you need freetype installed for it to build that support in; it autodetects during the installation).
+Russ Cox Oh, I know it is there. I am just not satisfied with some of its glyph rendering where it cuts off descenders on some font sizes. I looked at it for some time to make a plan on what to do about it, but it does require one to understand more Freetype to make it go well and look good.
+Jesper Louis Andersen i think there are some deeply embedded assumptions in acme (and in libframe in particular) that all characters are rendered in distinct non-overlapping rectangles. this might not be straightforward to fix.
+roger peppe Indeed, that assumption is what makes it hard to do. I note that in some case, Chrome, which I assume has a really strong glyph renderer, misses this and then re-renders the whole line.

The problem is that there is no "correct" solution, but only approximations and heuristics. So there is no obviously correct way to do this.

On the other hand, it works for Cocoa, so it must be possible to get it to work somewhat well. But to do it well, I need to visualize the bitmap in an XPM file or something so I can catch incorrect rendering quickly.
I am trying out Acme after watching this. So far I have been liking it, but I just hit an issue which I sent to Are there any other mailing lists or forums for Acme?
On the MacBook retina, scrolling feels slow. It's hard to tell whether it is due to video refresh slowness (due to the higher resolution) or due to some sort of erroneously slow mapping of the touchpad scroll events over onto devdraw. Is anything known about this issue?
It sounds like perhaps 'Watch go build' sees the build start to write the output file, which is a directory change, so it runs a new invocation of the command, which sees the half-written output file, gets confused, and exits.
+Ilmari Vacklin +Russ Cox Yes, that's the problem. Watch watches the directory, so it doesn't work right when the command it runs modifies the directory it's watching.
How to input Chinese in it ?
When I change to a Chinese input method and type something, acme get the char immediately, rather the waiting for a complete unicode char.
+毛康力, acme is reading raw keyboard codes. You'd need to change the logic there to obtain the codes differently or process them differently. If you'd like to try to modify it, the program that does this is called devdraw and it is in $PLAN9/src/cmd/devdraw. I'm afraid I don't know what's involved in interacting with alternate input methods.
I've discovered how easy it is to install Plan 9 from User Space on OS X, so I'm now playing with acme. I have a few questions about it.

- Where can I ask questions? I found the p9 user space development mailing list, but I could not find a users mailing list. So in the meantime I'll ask here ...
- Why are accents in a directory view garbled (on OS X?) Or when they are not garbled, they show after the letter they modify? For instance, the file name "Gödel without too many tears.pdf" is displayed as "Go¨del without  too many tears.pdf". The default font does not show the "¨" (it shows a special glyph instead), but Consolas shows the correct character but does not put it over the letter.
- Is there a way to unselect the text after a paste without using the mouse? (I can do right arrow - left arrow, but I'm wondering if there is a shorter way.)
- How do I do the "execute with argument" chord on OS X with a trackpad? I read above it's not possible, but I'm wondering if other users have found a work around.


Accents are corrupted on MacOS X because MacOS uses combining characters for accents, and acme doesn't understand combining characters. I'm not sure what a decent solution to this might look like. It would be easy enough to write a little filter command (you could use Go and ) to normalise combining characters. There's probably a command around that already does this.

For unselecting text after a paste, you've almost always got your hand on the mouse anyway, so an extra click will do that.
My workaround to the 'exec-with-arg' chord is to buy a good mouse, and only use the OSX machine for things where I have a stable surface on which I can use the mouse. It is way easier on a Thinkpad with its track-point.

For the paste thing, I think roger has the major point: You often have the mouse handy so just clicking somewhere is a solution. I often find I need to move the cursor to a new point after pasting, so I tend to move the cursor after a paste quite often with the mouse, avoiding the keyboard for that. Again, it requires your mouse to be more precise than what a trackpad can bring I think.
Regarding the trackpad, there is a nice patch here:

I've applied it and I can now 2-1 chord (using the ctrl key to input the 1 button click). It works great.

If you click this in acme you'll get around the point to edit:

I've gotten used to the paste thing. What was bothering me is using external programs to insert special (unicode) characters that would do it through pasting. Of course it does not play well with acme's model.

Finally, I'm having trouble with unicode and acme in general. I tried using Consolas, which supports many fonts, but some of them (like ∀ for instance) are not displayed (there is just a blank glyph). I've yet to find a satisfying solution for this.
Hello everybody in this thread. I wanna use acme from plan9port to OSX, for this I use homebrew to install port but then can't recognize what to do next in order to run acme. Can somebody help me?
+Igor Kashkuta Make sure that the correct bin directory is in your $PATH. And then run acme, perhaps with plumber& before. People tend to have a smallish script used to run acme and starting up the right things before doing so.
This presentation gave me a push to try Acme a second time. This time it has stuck. I'm switching from emacs. Have bought a 3-button mouse. I've also been poring over the Plan 9 papers and Pike's talks about Go. Very good stuff.
I’ve had the occasional weirdness in OS X, but ages ago. You seem to be using the default font.
Have you tried other fonts?
You may need to compile fontsrv (cd $PLAN9/src/cmd/fontsrv; mk install)
Once you've done that, there are instructions in this page to specify fonts for Acme.
+Jaime Silvela Yes, I'm able to use Acme with system fonts via fontsrv. Unfortunately, the problem persists regardless of which font I use.
+黄琦峰 Thanks. Love this change. I do not see this change being merged yet. Did you file a code review?
+王益 Thanks for your attention.  I just hack it and not push it for merge. 
This video, had been my starting point in a new way of interaction with my dev env. Actually I use acme as a shell to all my daily work... :)
Also I think is the way computer enginering should be. Simple solutions for complex problems!
Add a comment...