This is a port of many Plan 9 libraries and programs to Unix with my little fix.
- Fix acme shortcut for linux
- Add ttf2subf and droid-sans fonts
- Testing only linux systems.
- Add acme-golang addon see here
For ubuntu 18.04 LTS:
sudo apt-get install gcc libxext-dev libfontconfig-dev libxt-dev
For RHEL 8:
sudo dnf install gcc libXext-devel libXt-devel fontconfig-devel
Download
git clone https://github.com/ignusius/plan9port
To install, run ./INSTALL. It builds mk and then uses mk to run the rest of the installation.
For more details, see install(1), at install.txt in this directory and at https://9fans.github.io/plan9port/man/man1/install.html.
Add PATH in ~/.profile
export PLAN9="$HOME/plan9port"
export PATH="$PATH:$PLAN9/bin"
Run acme!
See https://9fans.github.io/plan9port/man/ for more documentation. (Documentation is also in this tree, but you need to run a successful install first. After that, "9 man 1 intro".)
Intro(1) contains a list of man pages that describe new features or differences from Plan 9.
If you'd like to help out, great! The TODO file contains a small list.
If you port this code to other architectures, please share your changes so others can benefit.
You can use Git to keep your local copy up-to-date as we make changes and fix bugs. See the git(1) man page here ("9 man git") for details on using Git.
Acme and fonts
You can use fontsrv, for example:
fontsrv -m ~/font/
acme -f ~/font/Ubuntu/11a/font
or use Droid-sans font:
acme -f ~/plan9/font/droid/droid.14.font
or convert your lovely font and use it:
ttf2subf -s 14 -f example.ttf -n example -m antialias
acme -f ~/you/path/example/example.14.font
Edit =
find out the current line number:13
goto 13th line:0
goto file beginning:$
goto file end:1,$
or:,
orEdit 1,$
orEdit ,
select all lines:1,5
orEdit 1,5
select lines 1..5Edit , d
clear windowEdit , < echo hello world
replace window body with some textEdit , < erl -man maps
replace window body with erlang manualEdit , s/text/TEXT/g
orEdit , | sed 's/text/TEXT/g'
global replace$%
or$samfile
current file name$winid
current window idecho some text | 9p write acme/$winid/body
append to the end of current window- keyboard shortcuts:
ctrl-c
copy (snarf)ctrl-v
pastectrl-z
undoctrl-y
redoctrl-g
get (Get command)ctrl-s
put (Put command)ctrl-u
delete from cursor to start of linectrl-w
delete word before the cursorctrl-h
delete character before the cursorctrl-a
move cursor to start of the linectrl-e
move cursor to end of the linectrl-i
tabctrl-j
enterctrl-f
filepath autocompletion
- search with right click:
:+/foobar
,:/foobar
and justfoobar
search forward:-/foobar
search backwards
- press
esc
to select the last typed text - press
esc
again to delete any selected text Font
switch between fonts:/^hel
regexp match: lines starting with 'hel':/lo\n/
regexp match: lines ending with 'lo':/^b/,/^e/
regexp match: lines between starting with 'b' and starting with 'e'Dump
write the state of acme to the fileLoad
restore from the dumpEdit , > python
pipe window body through python interpreter
Edit +/hello
search 'hello' forwardEdit -/hello
search 'hello' backwardEdit , > wc -l
count lines in fileEdit , | sort
sort linesEdit 3,5p
print lines 3..5 in new windowEdit 3,5 | upper
lines 3..5 upper casedEdit 3,5 s/HE/he/g
replace on 3..5 lines onlyEdit 2 d
delete 2nd lineEdit 2 c/new
change 2nd lineEdit 2 a/new
append text after 2nd lineEdit 2 i/new
insert text before 2nd lineEdit 2 < date
replace 2nd line with the output of dateEdit ,x/^TODAY$/ < date
replace matching lines with the output of dateEdit ,x/Plan9/ |tr a-z A-Z
replace all instances of Plan9 with upper caseEdit 3,5x/^/ a/ /
indent lines 3..5 with 1 tab
script 'a'
#!/home/user/plan9/bin/rc
NAMESPACE = `{mktemp -d}
plumber >/dev/null >[2=1]
font = '$HOME/plan9/font/droid/droid.16.font'
exec $PLAN9/bin/acme -c 1 -ab -f $font -F $font $*
run a 1.txt
-
Maintainer this fork: Alexander Komarov ignusius@gmail.com
-
Mailing list: https://groups.google.com/group/plan9port-dev
-
Issue tracker: https://github.com/9fans/plan9port/issues
-
Submitting changes: https://github.com/9fans/plan9port/pulls
-
Russ Cox rsc@swtch.com