2020-07-21 02:15:58 +00:00
|
|
|
# These are the common keys acrosso modes taken directly from Rustyline. If
|
|
|
|
# you want to change the keybinding you should change the letter after
|
|
|
|
# "key:". If you want to change the modifier you should change or add the
|
|
|
|
# modifier after "key:", such as:
|
|
|
|
# key:
|
|
|
|
# Ctrl: A
|
|
|
|
# Available modifiers are Ctrl, F (for function), Meta (escape-char, alt-char)
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Common From https://github.com/kkawakam/rustyline#actions
|
|
|
|
|
|
|
|
# Move cursor to the beginning of line
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Home:
|
|
|
|
binding:
|
|
|
|
Move: BeginningOfLine
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Move cursor to end of line
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
End:
|
|
|
|
binding:
|
|
|
|
Move: EndOfLine
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Move cursor one character left
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Left: #Left Arrow Key
|
|
|
|
binding:
|
|
|
|
Move:
|
|
|
|
BackwardChar: 1
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Move cursor one character right
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Right: #Right Arrow Key
|
|
|
|
binding:
|
|
|
|
Move:
|
|
|
|
ForwardChar: 1
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Interrupt/Cancel edition
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: C
|
|
|
|
binding:
|
|
|
|
Interrupt:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# (if line is not empty) Delete character under cursor
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: D
|
|
|
|
binding:
|
|
|
|
EndOfFile:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Delete character under cursor
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Delete:
|
|
|
|
binding:
|
|
|
|
Kill:
|
|
|
|
ForwardChar: 1
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Finish the line entry
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: J
|
|
|
|
binding:
|
|
|
|
AcceptLine:
|
2020-07-23 11:49:25 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: M
|
|
|
|
binding:
|
|
|
|
AcceptLine:
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Enter:
|
|
|
|
binding:
|
|
|
|
AcceptLine:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Next match from history
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Down: #Down Arrow Key
|
|
|
|
binding:
|
|
|
|
LineDownOrNextHistory: 1
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Previous match from history
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Up: #Up Arrow Key
|
|
|
|
binding:
|
|
|
|
LineUpOrPreviousHistory: 1
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Reverse Search history (Ctrl-S forward, Ctrl-G cancel)
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: R
|
|
|
|
binding:
|
|
|
|
ReverseSearchHistory:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Forward Search history (Ctrl-R backward, Ctrl-G cancel)
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: S
|
|
|
|
binding:
|
|
|
|
ForwardSearchHistory:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Transpose previous character with current character
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: T
|
|
|
|
binding:
|
|
|
|
TransposeChars:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Delete from start of line to cursor
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: U
|
|
|
|
binding:
|
|
|
|
Kill: BeginningOfLine
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Insert any special character without performing its associated action (#65)
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: Q
|
|
|
|
binding:
|
|
|
|
QuotedInsert:
|
|
|
|
- key:
|
|
|
|
Ctrl: V
|
|
|
|
binding:
|
|
|
|
QuotedInsert:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Delete word leading up to cursor (using white space as a word boundary)
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: W
|
|
|
|
binding:
|
|
|
|
Kill:
|
|
|
|
BackwardWord:
|
|
|
|
repeat: 1
|
|
|
|
word: Big
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Paste from Yank buffer
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: Y
|
|
|
|
binding:
|
|
|
|
Yank:
|
|
|
|
repeat: 1
|
|
|
|
anchor: Before
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Suspend (Unix only)
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: Z
|
|
|
|
binding:
|
|
|
|
Suspend:
|
|
|
|
|
2020-07-23 11:49:25 +00:00
|
|
|
# Undo
|
2020-07-21 02:15:58 +00:00
|
|
|
- key:
|
|
|
|
Ctrl: '_'
|
|
|
|
binding:
|
|
|
|
Undo: 1
|
|
|
|
|
|
|
|
# KeyPress::UnknownEscSeq => Cmd::Noop,
|
|
|
|
- key:
|
|
|
|
UnknownEscSeq:
|
|
|
|
binding:
|
|
|
|
Noop:
|
|
|
|
|