From c435d8b9b3844a4bd3d576378b83ec016a737e2e Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 4 May 2021 20:00:46 +0200 Subject: [PATCH] docs: Document enter/alt+enter harder These were mentioned in "multiline editing", but not in the shared bindings --- doc_src/interactive.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index c36162620..4d62b6bf2 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -178,6 +178,10 @@ Some bindings are common across Emacs and Vi mode, because they aren't text edit - :kbd:`←` (Left) and :kbd:`→` (Right) move the cursor left or right by one character. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`→` accepts the autosuggestion. +- :kbd:`Enter` executes the current commandline or inserts a newline if it's not complete yet (e.g. a ``)`` or ``end`` is missing). + +- :kbd:`Alt`\ +\ :kbd:`Enter` inserts a newline at the cursor position. + - :kbd:`Alt`\ +\ :kbd:`←` and :kbd:`Alt`\ +\ :kbd:`→` move the cursor one word left or right (to the next space or punctuation mark), or moves forward/backward in the directory history if the command line is empty. If the cursor is already at the end of the line, and an autosuggestion is available, :kbd:`Alt`\ +\ :kbd:`→` (or :kbd:`Alt`\ +\ :kbd:`F`) accepts the first word in the suggestion. - :kbd:`Control`\ +\ :kbd:`←` and :kbd:`Control`\ +\ :kbd:`→` move the cursor one word left or right. These accept one word of the autosuggestion - the part they'd move over.