github.com/elves/elvish@v0.15.0/pkg/edit/default_bindings.go (about) 1 package edit 2 3 // Elvish code for default bindings, assuming the editor ns as the global ns. 4 const defaultBindingsElv = ` 5 insert:binding = (binding-table [ 6 &Left= $move-dot-left~ 7 &Right= $move-dot-right~ 8 9 &Ctrl-Left= $move-dot-left-word~ 10 &Ctrl-Right= $move-dot-right-word~ 11 &Alt-Left= $move-dot-left-word~ 12 &Alt-Right= $move-dot-right-word~ 13 &Alt-b= $move-dot-left-word~ 14 &Alt-f= $move-dot-right-word~ 15 16 &Home= $move-dot-sol~ 17 &End= $move-dot-eol~ 18 19 &Backspace= $kill-rune-left~ 20 &Ctrl-H= $kill-rune-left~ 21 &Delete= $kill-rune-right~ 22 &Ctrl-W= $kill-word-left~ 23 &Ctrl-U= $kill-line-left~ 24 &Ctrl-K= $kill-line-right~ 25 26 &Ctrl-V= $insert-raw~ 27 28 &Alt-,= $lastcmd:start~ 29 &Alt-.= $insert-last-word~ 30 &Ctrl-R= $histlist:start~ 31 &Ctrl-L= $location:start~ 32 &Ctrl-N= $navigation:start~ 33 &Tab= $completion:smart-start~ 34 &Up= $history:start~ 35 &Alt-x= $minibuf:start~ 36 37 &Enter= $smart-enter~ 38 &Ctrl-D= $return-eof~ 39 ]) 40 41 command:binding = (binding-table [ 42 &'$'= $move-dot-eol~ 43 &0= $move-dot-sol~ 44 &D= $kill-line-right~ 45 &b= $move-dot-left-word~ 46 &h= $move-dot-left~ 47 &i= $listing:close~ 48 &j= $move-dot-down~ 49 &k= $move-dot-up~ 50 &l= $move-dot-right~ 51 &w= $move-dot-right-word~ 52 &x= $kill-rune-right~ 53 ]) 54 55 listing:binding = (binding-table [ 56 &Up= $listing:up~ 57 &Down= $listing:down~ 58 &Tab= $listing:down-cycle~ 59 &Shift-Tab= $listing:up-cycle~ 60 &Ctrl-'['= $close-listing~ 61 ]) 62 63 histlist:binding = (binding-table [ 64 &Ctrl-D= $histlist:toggle-dedup~ 65 ]) 66 67 navigation:binding = (binding-table [ 68 &Ctrl-'['= $close-listing~ 69 &Left= $navigation:left~ 70 &Right= $navigation:right~ 71 &Up= $navigation:up~ 72 &Down= $navigation:down~ 73 &PageUp= $navigation:page-up~ 74 &PageDown= $navigation:page-down~ 75 &Alt-Up= $navigation:file-preview-up~ 76 &Alt-Down= $navigation:file-preview-down~ 77 &Enter= $navigation:insert-selected-and-quit~ 78 &Alt-Enter= $navigation:insert-selected~ 79 &Ctrl-F= $navigation:trigger-filter~ 80 &Ctrl-H= $navigation:trigger-shown-hidden~ 81 ]) 82 83 completion:binding = (binding-table [ 84 &Ctrl-'['= $completion:close~ 85 &Down= $completion:down~ 86 &Up= $completion:up~ 87 &Tab= $completion:down-cycle~ 88 &Shift-Tab=$completion:up-cycle~ 89 &Left= $completion:left~ 90 &Right= $completion:right~ 91 ]) 92 93 history:binding = (binding-table [ 94 &Up= $history:up~ 95 &Down= $history:down-or-quit~ 96 &Ctrl-'['= $history:close~ 97 ]) 98 99 lastcmd:binding = (binding-table [ 100 &Alt-,= $listing:accept~ 101 ]) 102 103 -instant:binding = (binding-table [ 104 &Ctrl-'['= $listing:close~ 105 ]) 106 107 minibuf:binding = (binding-table [ 108 &Ctrl-'['= $listing:close~ 109 ]) 110 ` 111 112 // vi: set et: