Package org.jline.reader
Class Macro
java.lang.Object
org.jline.reader.Macro
- All Implemented Interfaces:
Binding
A macro that executes a sequence of keystrokes when invoked.
The Macro class is a type of Binding
that represents a sequence of keystrokes
to be executed when a key sequence bound to this macro is pressed. When triggered,
the LineReader will process each keystroke in the macro's sequence as if they were
typed by the user.
Macros are useful for automating repetitive sequences of editing operations by binding them to a single key combination. They can include any valid key sequence, including control characters and escape sequences.
For example, a macro might be used to:
- Move the cursor to the beginning of the line and insert a specific prefix
- Delete a word and replace it with another string
- Execute a series of editing commands in sequence
- See Also:
-
Constructor Summary
Constructors -
Method Summary