Mouse Shortcuts in Acme
“Acme has a very simple mouse interface, the first button selects text, the second button selects text, and the third button also selects text.” – Charles Forsyth (paraphrased)
Acme uses a very special, and I might add, cool, ‘mouse chording’ system that makes many complex text editing operations very simple and fast.
Basic mouse operations
- Button One - Select text.
- Button One double click - Select word under cursor, or at the end/start of a line, select the whole line.
- Button Two - Execute text*.
- Button Three - Plumb, if plumb fails, search for next occurrence of text*.
* This applies either to text ‘sweep’ by the mouse while holding down this button, or to the word/command under the cursor if it is clicked once.
- After selecting with Button One and while still holding Button One down (These chords also work with text selected by double-clicking, the double-click expansion happens when the second click starts, not when it ends):
- Clicking Button Two cuts.
- clicking Button Three pastes (Can be reverted by clicking Button Two immediately afterwards).
- To snarf (ie., copy) click Button Two** immediately followed by Button Three*.
- While holding down button 2 on text to be executed as a command, clicking button 1 appends the text last pointed to by button 1 as a distinct final argument. (For example, to search for literal text one may execute Look text with button 2 or instead point at text with button 1 in any window, release button 1, then execute Look, clicking button 1 while 2 is held down.)
Thanks to Tom Lieber for creating this graphical representation of the various mouse chords:
Todo: Illustrate the chord using button 2 followed by button 1 to pass selected text as argument to the command executed.
(Note: This list of chords is incomplete, for now see the acme(1) manual page for an explanation of mouse chording.)
Simulating 3 Buttons
Some mice (specially on laptops) lack 3 buttons, but usually there is a way to ‘emulate’ the missing buttons, but this is specific to the version of acme you are using, consult the p9p or acme-sac documentation for details.
Still, it is recommended you just get a real mouse or a real (Thinkpad) laptop ;)
- The Acme Readme - It includes a discussion of the Acme user interface in general with many examples.