-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.acme
107 lines (87 loc) · 2.79 KB
/
.acme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Starting
# ========
acme -m /mnt/acme .acme
# Tips
# ====
1. Left click places the cursor at the selected position.
2. Double left click selects text blocks (words, quotes, lines, brackets etc.)
3. Middle click executes selected content. If it's an Acme command like `Edit`,
it is executed by Acme, else it is executed by the shell. You can middle
click on the filename in the `tag` to execute it (based on the shebang). If
you are already in `win`, it just `stdin`'s it to the running process. This
can also be done by selecting the text with middle button. `Ctrl` plus left
click simulates the middle button.
4. Right click performs action according to the `plumbing` rules. For e.g., if
the selection is a file or directory, open it. If nothing matches, find the
next occurence of the text. You can make your own rules:
* Create a file called `$HOME/lib/plumbing`.
* Start the program called `plumber`.
* Update it:
```
cat $HOME/lib/plumbing | 9p write plumb/rules
```
This can also be done by selecting the text with right button. Shift plus
left click simulates the right button.
5. Scroll wheel expand and collapse `tags`.
6. The escape key (ESC) the content typed since the last mouse action. If it's
pressed again, it will cut the selection. This can be used in `win` to clear
the output and re-execute a command.
7. `$%` refers to the current file.
8. Sam command language:
* `Edit =` shows the current line number.
* Clearing the editor and inserting a new line:
```
Edit , {
d
c/\n
}
```
* `Edit X"." ...` executes edit over all open files.
9. `Send` sends the clipboard content to `win`. This can be used to send content
from `tags`/`buffer` etc., to Shell, REPL etc.
10. The Rc functions available in the environment are available in Acme, but
arguments needs to be single-quoted to work correctly.
12. Fonts can be changed using the `fontsrv` command.
13. `sed` and `xclip` can be used to do vertical selection.
14. Set `TERM=dumb` for `win` to work correctly.
15. `B`/`E` can be used to interact with the editor. `E` can be set as
`$EDITOR`.
# Commands
# ========
9 fd Font g "Indent on" src wc win winwatch
"| fmt -w 79" |sort
firefox term thunar
start-docker stop-docker
update clean
highlight -I -s molokai $% | vimb - >[2]/dev/null
| sqlformat - -r -k upper -i lower
# Files
# =====
dotfiles/.clang-format
dotfiles/.rcrc
dotfiles/plan9.txt
scratch/scratch.c
scratch/scratch.md
scratch/scratch.py
scratch/scratch.txt
scratch/plan9/ls.c
scratch/x11/button.c
# Folders
# =======
./
Data/
dotfiles/
notes/
scratch/
src/
src/plan9/
Unsynced/
# Git
# ===
git-cola
win git add -p
git commit -m Fixups
git push origin master:master
# Python
# ======
python pyflakes pylint