Keybindings
There are two editing modes available: Emacs mode and Vi mode. The modes can
be changed via key_bindings property in the config file (~/.myclirc) or
toggled via the F4 key.
Emacs mode is the default. In Emacs mode you can type Ctrl-a to go to the
beginning of a line and Ctrl-e to go to the end of a line and many more,
similar to the defaults of the readline library.
When Vi mode is enabled you can use modal editing features offered by Vim in the REPL.
Mycli also adds some custom keybindings which are summarized here along with completion navigation:
- f2 — toggle smart completions
- f3 — toggle multi-line mode
- f4 — toggle Vi/Emacs editing mode
- control-space — summon completions
- tab — summon completions + advance in completions
- enter — choose a completion candidate
- escape — cancel completions popup
- control-g — cancel completions popup
- control-r — search history with fzf if available
- alt-enter — add a line break in multi-line mode (or escape-enter)
- arrows — completion navigation
In Emacs mode only (with comma showing a sequence of multiple keystrokes):
- control-x, p — prettify a multi-line query
- control-x, u — unprettify a query
- control-o, d — insert the current date
- control-o, t — insert the current datetime
- control-o, control-d — insert the quoted current date
- control-o, control->t — insert the quoted current datetime
- alt-r — search history with fzf even if
~/.myclircis configured not to use it