nushell/docs/sample_config/keybindings.yml

151 lines
2.5 KiB
YAML
Raw Normal View History

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)
# 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
# Move cursor to end of line
2020-07-21 02:15:58 +00:00
- key:
End:
binding:
Move: EndOfLine
# Move cursor one character left
2020-07-21 02:15:58 +00:00
- key:
Left: #Left Arrow Key
binding:
Move:
BackwardChar: 1
# Move cursor one character right
2020-07-21 02:15:58 +00:00
- key:
Right: #Right Arrow Key
binding:
Move:
ForwardChar: 1
# Interrupt/Cancel edition
2020-07-21 02:15:58 +00:00
- key:
Ctrl: C
binding:
Interrupt:
# (if line is not empty) Delete character under cursor
2020-07-21 02:15:58 +00:00
- key:
Ctrl: D
binding:
EndOfFile:
# Delete character under cursor
2020-07-21 02:15:58 +00:00
- key:
Delete:
binding:
Kill:
ForwardChar: 1
# Finish the line entry
2020-07-21 02:15:58 +00:00
- key:
Ctrl: J
binding:
AcceptLine:
- key:
Ctrl: M
binding:
AcceptLine:
2020-07-21 02:15:58 +00:00
- key:
Enter:
binding:
AcceptLine:
# Next match from history
2020-07-21 02:15:58 +00:00
- key:
Down: #Down Arrow Key
binding:
LineDownOrNextHistory: 1
# Previous match from history
2020-07-21 02:15:58 +00:00
- key:
Up: #Up Arrow Key
binding:
LineUpOrPreviousHistory: 1
# Reverse Search history (Ctrl-S forward, Ctrl-G cancel)
2020-07-21 02:15:58 +00:00
- key:
Ctrl: R
binding:
ReverseSearchHistory:
# Forward Search history (Ctrl-R backward, Ctrl-G cancel)
2020-07-21 02:15:58 +00:00
- key:
Ctrl: S
binding:
ForwardSearchHistory:
# Transpose previous character with current character
2020-07-21 02:15:58 +00:00
- key:
Ctrl: T
binding:
TransposeChars:
# Delete from start of line to cursor
2020-07-21 02:15:58 +00:00
- key:
Ctrl: U
binding:
Kill: BeginningOfLine
# 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:
# 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
# Paste from Yank buffer
2020-07-21 02:15:58 +00:00
- key:
Ctrl: Y
binding:
Yank:
repeat: 1
anchor: Before
# Suspend (Unix only)
2020-07-21 02:15:58 +00:00
- key:
Ctrl: Z
binding:
Suspend:
# Undo
2020-07-21 02:15:58 +00:00
- key:
Ctrl: '_'
binding:
Undo: 1
# KeyPress::UnknownEscSeq => Cmd::Noop,
- key:
UnknownEscSeq:
binding:
Noop: