Acme


Plan 9 from User Space
| Home | Editors |

Acme is a fun little editor ported from Plan 9 that is easily expandable. It doesn't come with all the bells and whistles you expect from an editor today, but it is pretty easy to customize.

I've been playing with it for a few months now and the only things I really miss from Emacs are syntax highlighting and some features from DIRED. You can expand it by piping buffers very similar to how you pipe commands in a shell. These commands can be part of the text itself, or the TAG line which is essentially a second buffer for that windows menu. You can use a command in the window or TAG to modify the TAG.

Menu commands, or commands in the body of the text are executed by middle clicking on them. The commands can take highlighted text as input for the command, insert the result of the command, or filter the buffered content through a pipe.

Acme Screen Shot

You'll definitely want Plan 9 Port in your path and probably want fontsrv running. Here's a few excerpts from my ~/.profile file.

path_add() {
    if ! echo $PATH |grep $1 >/dev/null ;
    then
	PATH=$PATH:$1
	(date; echo path_add PATH=$PATH:$1) >>$STARTLOG
    fi
}

# installed plan9port from github
# git clone https://github.com/9fans/plan9port plan9
if [ -d /usr/local/plan9 ]; then
	PLAN9=/usr/local/plan9
	export PLAN9
	path_add $PLAN9/bin
# It's convenient to have plumber and fontsrv running with acme
	pgrep plumber || plumber
	pgrep fontsrv || fontsrv &
fi

Saving the selected font(s) appears to be bugged on Plan 9 Port, but you can toggle fonts by middle clicking "Font" or select a font by highlighting and middle clicking, "Font fix /mnt/font/NotoSansMono-Regular/14a/font" .

You can also pass the font when you launch acme by using the -f (proportional font) or -F (fixed font), so using a startup script should work.

I've put together a number of tools to use to assist with formatting and programming for use with acme. Quo, string_tools, and text_tools have their own man pages.

Tools

Ap

Ap is used to set the tagline. By middle clicking on ap html it will open a crib file you can use to copy and paste multiple commands and add a few useful utilities to the tag line. It will also log the file and start time. Middle clicking ds can be used tag the stop time in the log.

Quo

Quo is a tool to quote input. It's easier to type, echo 0 1 2 3 4 5 6 7 8 9 a b c d e f | quo -1 -c, then echo '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'. I probably need a more useful example, but hopefully my point comes through.

String Tools

String Tools is a loose collection of tools to play with strings. I like to explode strings for menu titles. cswitch was an idea I got while doing this to give me a nice skeleton to work with. Middle clicking on <cswitch abcdef will give me:

	case 'a':
		break;
	case 'b':
		break;
	case 'c':
		break;
	case 'd':
		break;
	case 'e':
		break;
	case 'f':
		break;
	default:
		break;

Text Tools

Text Tools is another loose collection of tools to deal with comments and whitespace. It allows you to easily indent highlighted text, or remove leading whitespace. It was easier to add separate commands for commenting for shell, html, C, and Pascal than to get one command that would check the buffer to guess the type of file and act accordingly. Most of these commands fit comfortably in the tagline set by ap.

"Space Glenda" artwork is from Plan 9 Port

Saturday, 28 November 2026   Michael J. Chappell   Contact me at: mcsuper5@freeshell.org Made with Acme