- Remove the `Signal::CtrlL` as it requires explicit handling and
cooperation but we offer configurable keybindings already
- Default keybinding of `Ctrl-l` is `ReedlineEvent::ClearScreen` that
directly performs the scrollback buffer preserving clear of the current
screen.
- Add `ReedlineEvent::ClearScrollback` to perform screen clearing with
removal of the scrollback buffer. (Demo will now do that on clear as
seen in bash, zsh etc.)
Fixes#120
Helps with nushell/nushell#5089
Uses the system newline separator
Example in main with `Alt+Enter` (according to @fdncred `cmd-option-enter` or `shift-option-enter` on macOS to get the same key event)
* Implement vi's `I` normal mode binding to start insert mode at the lines start.
* Use `MoveToLineStart/End` instead to correctly work on lines
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
Default constructor created a Hinter and Validator.
Disabling those required writing a noop version of the trait (see #392 for an example).
Now they are off by default and can be added or removed via the
"builder" pattern.
Changes the completer trait to take a mutable reference of itself on
calling `Completer::complete`
This enables the `Completer` to do caching or other smart things on the fly.
* generic reedline menus
* change word in description
* correct tests in examples
* corrected menu names
* renamed menu
* option for menus to take full line buffer
* corrected list menu insertion
The fallible std::io::Results were originally introduced for the history
file but the critical points are completely separated from the builder
pattern now.
Makes the public API nicer
* add description to completion suggestions
* completion menu with help
* corrected doc tests
* moved menu functions to module
* menu type with its own completer
* corrected doc tests
* function for menus to quick complete
Painter is currently leaked by `Menu` trait. Thus document the safe part
that is used for this implementation.
Also define the responsibility of editor
- Terminate with semicolon, where return type `()`
- Invert some conditionals for readability
- `match` to `if let` if binary
- pass by value vs by reference
- `must_use` attribute where applicable (builder patterns)
- make internal `Mode` enum explicitly `ViMode`
- Docstring fixes
- Format explicit identifiers in docs