Line 0
Link Here
|
|
|
1 |
Taking inspiration from prefix keys and prefix arguments, Transient |
2 |
implements a similar abstraction involving a prefix command, infix |
3 |
arguments and suffix commands. We could call this abstraction a |
4 |
"transient command", but because it always involves at least two |
5 |
commands (a prefix and a suffix) we prefer to call it just a |
6 |
"transient". |
7 |
|
8 |
When the user calls a transient prefix command, then a transient |
9 |
(temporary) keymap is activated, which binds the transient’s infix |
10 |
and suffix commands, and functions that control the transient state |
11 |
are added to `pre-command-hook` and `post-command-hook`. The available |
12 |
suffix and infix commands and their state are shown in a popup buffer |
13 |
until the transient is exited by invoking a suffix command. |
14 |
|
15 |
Calling an infix command causes its value to be changed, possibly by |
16 |
reading a new value in the minibuffer. |
17 |
|
18 |
Calling a suffix command usually causes the transient to be exited but |
19 |
suffix commands can also be configured to not exit the transient. |
20 |
|
21 |
WWW: https://github.com/magit/transient |