Class Vi
java.lang.Object
org.aesh.readline.editing.Vi
- All Implemented Interfaces:
EditMode
Vi-style line editing mode implementation.
- Author:
- Ståle W. Pedersen
-
Nested Class Summary
Nested classes/interfaces inherited from interface EditMode
EditMode.Mode, EditMode.Status -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an action mapping by key input and action name.addAction(int[] input, org.aesh.readline.editing.Vi.ActionStatus status) Add an action mapping for input code points with action status.Add an action mapping for a key by action name.addAction(Key key, String action, EditMode.Status status) Add an action mapping for a key with action name and status.addAction(Key key, String action, EditMode.Status status, EditMode.Status after) Add an action mapping for a key with action name, current and next status.Add an action mapping for a key.addAction(Key key, Action action, EditMode.Status status) Add an action mapping for a key with status.addAction(Key key, Action action, EditMode.Status status, EditMode.Status after) Add an action mapping for a key with current and next status.addAction(Key key, Action action, EditMode.Status status, EditMode.Status after, EditMode.Status actionStatus) Add an action mapping for a key with full status configuration.Add an action mapping for a key with action status.addActionGroup(int[] input, org.aesh.readline.editing.Vi.ActionStatusGroup group) Add an action group mapping for input code points.addActionGroup(Key key, org.aesh.readline.editing.Vi.ActionStatusGroup group) Add an action group mapping for a key.voidaddVariable(Variable variable, String value) Add a variable with its value.booleanCheck if currently in a chained action sequence.keys()Get the key actions for this mode.mode()Get the editing mode type.Parse a key event and return the corresponding action.prevKey()Get the previous key action.voidremapKeysFromDevice(Device device) Remap keys based on device capabilities.voidsetPrevKey(KeyAction event) Set the previous key action.voidsetStatus(EditMode.Status status) Set the edit status.status()Get the current edit status.voidupdateIgnoreEOF(int eof) Update the ignore-EOF counter.variableValue(Variable variable) Get the value of a variable.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EditMode
createKeyEvent
-
Method Details
-
addAction
-
remapKeysFromDevice
Description copied from interface:EditModeRemap keys based on device capabilities.- Specified by:
remapKeysFromDevicein interfaceEditMode- Parameters:
device- the terminal device
-
prevKey
-
setPrevKey
Description copied from interface:EditModeSet the previous key action.- Specified by:
setPrevKeyin interfaceEditMode- Parameters:
event- the key action to set as previous
-
addVariable
Description copied from interface:EditModeAdd a variable with its value.- Specified by:
addVariablein interfaceEditMode- Parameters:
variable- the variable to setvalue- the value to assign
-
variableValue
Description copied from interface:EditModeGet the value of a variable.- Specified by:
variableValuein interfaceEditMode- Parameters:
variable- the variable to look up- Returns:
- the variable's value, or null if not set
-
addAction
-
addAction
-
addAction
Add an action mapping for input code points with action status.- Parameters:
input- the input code pointsstatus- the action status- Returns:
- this Vi instance for chaining
-
addAction
Add an action mapping for a key with action name and status.- Parameters:
key- the key to mapaction- the action namestatus- the status when this action is active- Returns:
- this Vi instance for chaining
-
addAction
Add an action mapping for a key with action name, current and next status.- Parameters:
key- the key to mapaction- the action namestatus- the current status when this action is activeafter- the status to transition to after the action- Returns:
- this Vi instance for chaining
-
addAction
-
addAction
Add an action mapping for a key with status.- Parameters:
key- the key to mapaction- the action to performstatus- the status when this action is active- Returns:
- this Vi instance for chaining
-
addAction
Add an action mapping for a key with current and next status.- Parameters:
key- the key to mapaction- the action to performstatus- the current status when this action is activeafter- the status to transition to after the action- Returns:
- this Vi instance for chaining
-
addAction
public Vi addAction(Key key, Action action, EditMode.Status status, EditMode.Status after, EditMode.Status actionStatus) Add an action mapping for a key with full status configuration.- Parameters:
key- the key to mapaction- the action to performstatus- the current status when this action is activeafter- the status to transition to after the actionactionStatus- the action's internal status- Returns:
- this Vi instance for chaining
-
addActionGroup
-
addActionGroup
Add an action group mapping for input code points.- Parameters:
input- the input code pointsgroup- the action status group- Returns:
- this Vi instance for chaining
-
updateIgnoreEOF
public void updateIgnoreEOF(int eof) Description copied from interface:EditModeUpdate the ignore-EOF counter.- Specified by:
updateIgnoreEOFin interfaceEditMode- Parameters:
eof- the EOF value to update
-
mode
Description copied from interface:EditModeGet the editing mode type. -
keys
-
status
Description copied from interface:EditModeGet the current edit status. -
setStatus
Description copied from interface:EditModeSet the edit status. -
parse
-
isInChainedAction
public boolean isInChainedAction()Description copied from interface:EditModeCheck if currently in a chained action sequence.- Specified by:
isInChainedActionin interfaceEditMode- Returns:
- true if in a chained action
-