-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkeybindings.nu
More file actions
51 lines (51 loc) · 1.07 KB
/
Copy pathkeybindings.nu
File metadata and controls
51 lines (51 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$env.config.keybindings ++= [
{
name: insert_file_name
modifier: CONTROL
keycode: char_f
mode: [emacs vi_insert]
event: [
{
send: executehostcommand,
cmd: "sf | commandline edit -i $in"
}
]
}
{
name: insert_last_token
modifier: alt
keycode: char_.
mode: [emacs, vi_insert]
event: [
{ edit: InsertString, value: " !$" }
{ send: Enter }
]
}
{
name: insert_last_token
modifier: shift_control
keycode: up
mode: [emacs, vi_insert]
event: [
{ edit: InsertString, value: " !$" }
{ send: Enter }
]
}
# Some extra keybindings from awesome-nu
{
name: fuzzy_history
modifier: control
keycode: char_h
mode: [emacs, vi_normal, vi_insert]
event: {
send: executehostcommand
cmd: "
history
| each { |it| $it.command }
| uniq
| reverse
| input list --fuzzy $'Please choose a (ansi magenta)command from history(ansi reset):'
| commandline edit -i $in"
}
}
]