mirror of
https://github.com/nushell/nushell.git
synced 2024-11-08 09:34:30 +01:00
sample config settigns (#2233)
This commit is contained in:
parent
aaed9c4e8a
commit
32b875ada9
35
docs/sample_config/config.toml
Normal file
35
docs/sample_config/config.toml
Normal file
@ -0,0 +1,35 @@
|
||||
completion_mode = "circular"
|
||||
edit_mode = "vi"
|
||||
history_size = 100000
|
||||
key_timeout = 500
|
||||
|
||||
disable_table_indexes = false
|
||||
header_align = "l"
|
||||
header_color = "c"
|
||||
header_bold = true
|
||||
nonzero_exit_errors = true
|
||||
startup = ["alias la [path] {ls --full $path}", "alias nudown [] {fetch https://api.github.com/repos/nushell/nushell/releases | get assets | select name download_count}"]
|
||||
table_mode = "other"
|
||||
plugin_dirs = ["D:\\Src\\GitHub\\nu-plugin-lib\\samples\\Nu.Plugin.Len\\bin\\Debug\\netcoreapp3.1"]
|
||||
pivot_mode = "auto"
|
||||
ctrlc_exit = false
|
||||
complete_from_path = true
|
||||
rm_always_trash = true
|
||||
use_starship = false
|
||||
prompt = "echo [ $(ansi gb) $(pwd) $(ansi reset) \"(\" $(ansi cb) $(do -i { git rev-parse --abbrev-ref HEAD | trim }) $(ansi reset) \")\" $(char newline) $(ansi yb) $(date --format \"%m/%d/%Y %I:%M:%S%.3f %p\" --raw) $(ansi reset) \"> \" ] | str collect"
|
||||
|
||||
[textview]
|
||||
term_width = "default"
|
||||
tab_width = 4
|
||||
colored_output = true
|
||||
true_color = true
|
||||
header = true
|
||||
line_numbers = true
|
||||
grid = false
|
||||
vcs_modification_markers = true
|
||||
snip = true
|
||||
wrapping_mode = "NoWrapping"
|
||||
use_italics = true
|
||||
paging_mode = "QuitIfOneScreen"
|
||||
pager = "less"
|
||||
theme = "TwoDark"
|
189
docs/sample_config/keybindings.yml
Normal file
189
docs/sample_config/keybindings.yml
Normal file
@ -0,0 +1,189 @@
|
||||
# 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
|
||||
# KeyPress::Home => Cmd::Move(Movement::BeginningOfLine),
|
||||
- key:
|
||||
Home:
|
||||
binding:
|
||||
Move: BeginningOfLine
|
||||
|
||||
# KeyPress::End => Cmd::Move(Movement::EndOfLine),
|
||||
- key:
|
||||
End:
|
||||
binding:
|
||||
Move: EndOfLine
|
||||
|
||||
# KeyPress::Left => {
|
||||
# if positive {
|
||||
# Cmd::Move(Movement::BackwardChar(n))
|
||||
# } else {
|
||||
# Cmd::Move(Movement::ForwardChar(n))
|
||||
# }
|
||||
# }
|
||||
- key:
|
||||
Left: #Left Arrow Key
|
||||
binding:
|
||||
Move:
|
||||
BackwardChar: 1
|
||||
|
||||
# KeyPress::Right => {
|
||||
# if positive {
|
||||
# Cmd::Move(Movement::ForwardChar(n))
|
||||
# } else {
|
||||
# Cmd::Move(Movement::BackwardChar(n))
|
||||
# }
|
||||
# }
|
||||
- key:
|
||||
Right: #Right Arrow Key
|
||||
binding:
|
||||
Move:
|
||||
ForwardChar: 1
|
||||
|
||||
# KeyPress::Ctrl('C') => Cmd::Interrupt,
|
||||
- key:
|
||||
Ctrl: C
|
||||
binding:
|
||||
Interrupt:
|
||||
|
||||
# KeyPress::Ctrl('D') => Cmd::EndOfFile,
|
||||
- key:
|
||||
Ctrl: D
|
||||
binding:
|
||||
EndOfFile:
|
||||
|
||||
# KeyPress::Delete => {
|
||||
# if positive {
|
||||
# Cmd::Kill(Movement::ForwardChar(n))
|
||||
# } else {
|
||||
# Cmd::Kill(Movement::BackwardChar(n))
|
||||
# }
|
||||
# }
|
||||
- key:
|
||||
Delete:
|
||||
binding:
|
||||
Kill:
|
||||
ForwardChar: 1
|
||||
|
||||
# KeyPress::Ctrl('J') |
|
||||
# KeyPress::Enter => Cmd::AcceptLine,
|
||||
- key:
|
||||
Ctrl: J
|
||||
binding:
|
||||
AcceptLine:
|
||||
- key:
|
||||
Enter:
|
||||
binding:
|
||||
AcceptLine:
|
||||
|
||||
# KeyPress::Down => Cmd::LineDownOrNextHistory(1),
|
||||
- key:
|
||||
Down: #Down Arrow Key
|
||||
binding:
|
||||
LineDownOrNextHistory: 1
|
||||
|
||||
# KeyPress::Up => Cmd::LineUpOrPreviousHistory(1),
|
||||
- key:
|
||||
Up: #Up Arrow Key
|
||||
binding:
|
||||
LineUpOrPreviousHistory: 1
|
||||
|
||||
# KeyPress::Ctrl('R') => Cmd::ReverseSearchHistory,
|
||||
- key:
|
||||
Ctrl: R
|
||||
binding:
|
||||
ReverseSearchHistory:
|
||||
|
||||
# KeyPress::Ctrl('S') => Cmd::ForwardSearchHistory, // most terminals override Ctrl+S to suspend execution
|
||||
- key:
|
||||
Ctrl: S
|
||||
binding:
|
||||
ForwardSearchHistory:
|
||||
|
||||
# KeyPress::Ctrl('T') => Cmd::TransposeChars,
|
||||
- key:
|
||||
Ctrl: T
|
||||
binding:
|
||||
TransposeChars:
|
||||
|
||||
# KeyPress::Ctrl('U') => {
|
||||
# if positive {
|
||||
# Cmd::Kill(Movement::BeginningOfLine)
|
||||
# } else {
|
||||
# Cmd::Kill(Movement::EndOfLine)
|
||||
# }
|
||||
# },
|
||||
- key:
|
||||
Ctrl: U
|
||||
binding:
|
||||
Kill: BeginningOfLine
|
||||
|
||||
# KeyPress::Ctrl('Q') | // most terminals override Ctrl+Q to resume execution
|
||||
# KeyPress::Ctrl('V') => Cmd::QuotedInsert,
|
||||
- key:
|
||||
Ctrl: Q
|
||||
binding:
|
||||
QuotedInsert:
|
||||
- key:
|
||||
Ctrl: V
|
||||
binding:
|
||||
QuotedInsert:
|
||||
|
||||
# KeyPress::Ctrl('W') => {
|
||||
# if positive {
|
||||
# Cmd::Kill(Movement::BackwardWord(n, Word::Big))
|
||||
# } else {
|
||||
# Cmd::Kill(Movement::ForwardWord(n, At::AfterEnd, Word::Big))
|
||||
# }
|
||||
# }
|
||||
- key:
|
||||
Ctrl: W
|
||||
binding:
|
||||
Kill:
|
||||
BackwardWord:
|
||||
repeat: 1
|
||||
word: Big
|
||||
|
||||
# KeyPress::Ctrl('Y') => {
|
||||
# if positive {
|
||||
# Cmd::Yank(n, Anchor::Before)
|
||||
# } else {
|
||||
# Cmd::Unknown // TODO Validate
|
||||
# }
|
||||
# }
|
||||
- key:
|
||||
Ctrl: Y
|
||||
binding:
|
||||
Yank:
|
||||
repeat: 1
|
||||
anchor: Before
|
||||
|
||||
# KeyPress::Ctrl('Z') => Cmd::Suspend,
|
||||
- key:
|
||||
Ctrl: Z
|
||||
binding:
|
||||
Suspend:
|
||||
|
||||
# KeyPress::Ctrl('_') => Cmd::Undo(n),
|
||||
- key:
|
||||
Ctrl: '_'
|
||||
binding:
|
||||
Undo: 1
|
||||
|
||||
# KeyPress::UnknownEscSeq => Cmd::Noop,
|
||||
- key:
|
||||
UnknownEscSeq:
|
||||
binding:
|
||||
Noop:
|
||||
|
||||
# KeyPress::BracketedPasteStart => {
|
||||
# let paste = rdr.read_pasted_text()?;
|
||||
# Cmd::Insert(1, paste)
|
||||
# },
|
||||
# _ => Cmd::Unknown,
|
||||
# })
|
Loading…
Reference in New Issue
Block a user