Home Explore Blog CI



nushell

3rd chunk of `book/line_editor.md`
24d45f3983b21937d8a922b81977153907599d1aec62e67e0000000100000fb2
| <kbd>Ctrl</kbd>+<kbd>L</kbd>                | Clear screen        |
| <kbd>↑</kbd> (Up Arrow)                     | Move up             |
| <kbd>↓</kbd> (Down Arrow)                   | Move down           |
| <kbd>←</kbd> (Left Arrow)                   | Move left           |
| <kbd>→</kbd> (Right Arrow)                  | Move right          |
| <kbd>Ctrl></kbd>+<kbd>→</kbd> (Right Arrow) | Move right one word |
| <kbd>Ctrl></kbd>+<kbd>←</kbd> (Left Arrow)  | Move left one word  |

### Vi-normal Motions

As with Vi, many motions and actions can be combined with an optional count in normal-mode. For example, <kbd>3</kbd><kbd>d</kbd><kbd>w</kbd> deletes the next three words.

| Key                                    | Motion                                        |
| -------------------------------------- | --------------------------------------------- |
| <kbd>w</kbd>                           | Move to beginning of next word                |
| <kbd>e</kbd>                           | Move to end of current or next word           |
| <kbd>b</kbd>                           | Move to beginning of current or previous word |
| <kbd>0</kbd>                           | Move to start of line                         |
| <kbd>$</kbd>                           | Move to end of line                           |
| <kbd>h</kbd>                           | Move left                                     |
| <kbd>l</kbd>                           | Move right                                    |
| <kbd>j</kbd>                           | Move down                                     |
| <kbd>k</kbd>                           | Move up                                       |
| <kbd>f</kbd>+\<char\>                  | Move right to \<char\>                        |
| <kbd>t</kbd>+\<char\>                  | Move right to before \<char\>                 |
| <kbd>Shift</kbd>+<kbd>F</kbd>+\<char\> | Move left to \<char\>                         |
| <kbd>Shift</kbd>+<kbd>T</kbd>+\<char\> | Move left to after \<char\>                   |

### Vi-normal Actions

These actions can be combined with many of the [motions above](#vi-normal-motions).

| Key                           | Action                                             |
| ----------------------------- | -------------------------------------------------- |
| <kbd>d</kbd>                  | Delete                                             |
| <kbd>Shift</kbd>+<kbd>D</kbd> | Delete to end of line                              |
| <kbd>p</kbd>                  | Paste after current character                      |
| <kbd>Shift</kbd>+<kbd>P</kbd> | Paste before current character                     |
| <kbd>i</kbd>                  | Enter Vi insert-mode (append) at current character |
| <kbd>Shift</kbd>+<kbd>I</kbd> | Enter insert-mode at beginning of line             |
| <kbd>a</kbd>                  | Append after current character                     |
| <kbd>Shift</kbd>+<kbd>A</kbd> | Append to end of line                              |
| <kbd>0</kbd>                  | Move to start of line                              |
| <kbd>^</kbd>                  | Move to start of line                              |
| <kbd>$</kbd>                  | Move to end of line                                |
| <kbd>c</kbd>                  | Change                                             |
| <kbd>r</kbd>                  | Replace                                            |
| <kbd>s</kbd>                  | Substitute character(s)                            |
| <kbd>x</kbd>                  | Delete character                                   |
| <kbd>u</kbd>                  | Undo                                               |

## Command History

As mentioned before, Reedline manages and stores all the commands that are
edited and sent to Nushell. To configure the max number of records that
Reedline should store you will need to adjust this value in your config file:

```nu
  $env.config = {
    ...

Title: Reedline: Vi-normal Motions and Actions, Command History
Summary
This section details Vi-normal mode's motions and actions in Reedline, which are inspired by Vi. Motions allow navigation, and actions perform operations that can be combined with motions, often with an optional count. Available motions include moving to the beginning/end of words or lines, and searching for specific characters. Actions include deleting, pasting, inserting, appending, changing, replacing, substituting, undoing, and deleting characters. The section also introduces command history, stating that Reedline manages and stores commands, which can be configured.