From 357a572b43bcd908afcf294518a7587fa75a1223 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 5 Apr 2019 14:08:58 +0200 Subject: [PATCH] docs/index: Document repaint-mode This was only mentioned in passing in the bind docs. [ci skip] --- sphinx_doc_src/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx_doc_src/index.rst b/sphinx_doc_src/index.rst index f6b72f568..3f27ebef0 100644 --- a/sphinx_doc_src/index.rst +++ b/sphinx_doc_src/index.rst @@ -1483,6 +1483,8 @@ It is also possible to add all emacs-mode bindings to vi-mode by using something When in vi-mode, the `fish_mode_prompt `_ function will display a mode indicator to the left of the prompt. The ``fish_vi_cursor`` function will be used to change the cursor's shape depending on the mode in supported terminals. To disable this feature, override it with an empty function. To display the mode elsewhere (like in your right prompt), use the output of the ``fish_default_mode_prompt`` function. +When a binding switches the mode, it will repaint the mode-prompt if it exists, and the rest of the prompt only if it doesn't. So if you want a mode-indicator in your ``fish_prompt``, you need to erase ``fish_mode_prompt`` e.g. by adding an empty file at `~/.config/fish/functions/fish_mode_prompt.fish`. (Bindings that change the mode are supposed to call the `repaint-mode` bind function, see :ref:`bind `) + .. _vi-mode-command: Command mode