github.com/xyproto/u-root@v6.0.1-0.20200302025726-5528e0c77a3c+incompatible/cmds/core/elvish/eval/bundled/binding.elv.go (about)

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