all repos — acme @ 65086bf370181c8e36a64d572dc51d290e4488a2

fork of the acme editor from plan9port - keybinds, tweaks, config.h, etc

add readme, install script; v9001-a01
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmIT3+MACgkQO3+8IhRO
Y5gIrQ/+NvTO/O9CBUi84p3Tw9infKJDw4NaTnSuyzSD8nm4LPQtNnZ9EuroyDt1
tqt+XgaUq83w34u0QrinBcdH+aVfvEtbNvVt6EWBMkuD7iBwuhtI9gE/6RVJnFNI
Q7ky8LEQk+uRr0d+nxt0hAkttSAi4UiuYZKHVGRRqBXoxf7E6/ORJbj+flDYaLJF
kIEh0pzyoY/5fx/fhZHnL2yQjhS1XpoGKSbZfThF1Fe+KZRIGO71m96/ql3fQwAP
S7FWgJtvman+smy7J5TfHr4fG4kuRnycEP3OJZ+ZGuenvEuG9dtOu7xp0gyY5My3
JNsCIcPmo2SQToCZMEEI0ec+4o8UXIg3++RWekFdZSgHuSs03iGj4Fsf6nvPMCTN
3xX3ZPREb6RCN3FESfAjp/4ZOrRw/g4YobAPEZi9H+bZZCfnPjNLmjDTqw+Aiwgx
gfgLcMrNnS5rLPdXvcSVtg6NGXhprRlTP3Fz+CwCcYkE7jM36I+es22ahMZ7sxYw
PlaUfnbS2fhfOs8MPmqpxtV7nXcxIb2sfzmhmpwPnpI4EXvPL6XhFHZElFyPgTL7
aUxH28HdT2vMuxADzyYRADde6z+LoGM0p0tn3auwzO8HvnFGThmbyH8DozE/JowI
kiGlFQ21FDPrdQxHv1aERnWwdoXqYh4yJ8RpcClFFdynfdvaiOM=
=OSKf
-----END PGP SIGNATURE-----
commit

65086bf370181c8e36a64d572dc51d290e4488a2

parent

27aa20a319d9b390ae5bc6ac230d84b509866dfc

4 files changed, 81 insertions(+), 2 deletions(-)

jump to
A README.md

@@ -0,0 +1,56 @@

+# acme9k + +This is a fork of the `acme` text editor from the `plan9port` distribution. It combines the customizability of [lumar](https://github.com/lumar)/[sminez](https://github.com/sminez/plan9port)'s forks and [acme2k](https://github.com/karahobny/acme2k) with upstream fixes from [9fans](https://github.com/9fans/plan9port) and some custom work. + +See the `config.def.h` for out of the box customizations that can be done. + +[![screenshot](./scrot.png)](./scrot.png) + +## usage + +Keybindings are as follows: + +- Ctrl + - c: copy + - x: cut + - v: paste + - z: undo + - y: redo + - s: save + - e: move to end of line + - a: move to begining of line + - f: filename completion + - u: kill line + - w: kill word (backwords) +- Up/Down: move cursor +- PgUp/PgDown: the obvious +- Esc: cut if there is a selection, otherwise hilight the most recently edited text + +Users unfamiliar with acme in general should check the following resources: + +- [Acme: A User Interface for Programmers](http://doc.cat-v.org/plan_9/4th_edition/papers/acme/) - the definitive guide from Rob Pike +- [A Tour of Acme](https://research.swtch.com/acme) - Russ Cox giving a tour of acme on plan9port (video) +- [acme(1)](http://man.cat-v.org/plan_9/1/acme) - manual page + +## build + +- Clone this repository +- From the repo root, if desired, copy `config.def.h` to `config.h` and make your modifications +- Run `./build.sh` from the repo root. + +## install + +After building, run `./install.sh`; If run as a regular user, it will install to `~/bin/9`; if run as root, it will overwrite the systemwide `acme` in `$PLAN9/bin` + +## TODO + +* [ ] add an indicator of the active window when click to focus (`bartflag`) is enabled + +## thanks + +* [rob pike](https://github.com/robpike) author of the original acme for plan9 +* [russ cox](https://research.swtch.com) and the rest of the [9fans](https://github.com/9fans) for plan9port +* [lumar](https://github.com/lumar) - looks like they deleted their github repos but I originally pulled my keybinds from there +* [sminez](https://github.com/sminez) - possibly the original source of lumar's keybindings +* [karahobny](https://github.com/karahobny) - creator of acme2k, a big inspiration for this project +* [aksr](https://github.com/aksr) - source of the missing tag border pixel fix
M acme.cacme.c

@@ -9,6 +9,7 @@ #include <frame.h>

#include <fcall.h> #include <plumb.h> #include <libsec.h> +#include <stdio.h> #include "dat.h" #include "fns.h" /* for generating syms in mkfile only: */

@@ -41,6 +42,8 @@ };

Rune snarfrune[NSnarf + 1]; char* fontnames[2] = {PRIMARY_FONT, SECONDARY_FONT}; + +char version[] = "acme9k v9001-a01"; Command* command;

@@ -116,6 +119,10 @@ case 'W':

winsize = ARGF(); if (winsize == nil) goto Usage; + break; + case 'v': + fprintf(stdout, "%s\n", version); + exit(0); break; default: Usage:

@@ -983,7 +990,7 @@ Rectangle r, r1;

Image* tmp; if (tagcols[BACK] == nil) { - /* Black */ + /* TAG */ tagcols[BACK] = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_TAG_BG); tagcols[HIGH] =

@@ -995,7 +1002,7 @@ allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_TAG_TX);

tagcols[HTEXT] = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_TAG_HT); - /* Blue */ + /* BODY */ textcols[BACK] = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, COLOR_BODY_BG); textcols[HIGH] =
A install.sh

@@ -0,0 +1,16 @@

+#!/bin/sh + +if [ -z "$PLAN9" ]; then + echo "PLAN9 not set;" + echo "Please set it to the location of your plan9port installation." + exit 1 +fi + +if [ $(whoami) != "root" ]; then + mkdir -p ~/bin/9 + cp acme ~/bin/9/acme + echo "acme has been installed to '${HOME}/bin/9/'" +else + cp acme ${PLAN9}/bin/acme + echo "acme has been installed to '${PLAN9}/bin/'" +fi