mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-03 11:51:15 -03:00
docs: standardise name for vi mode
Vi mode, vi-mode and various permutations are used. Standardise on "vi mode".
This commit is contained in:
@@ -36,7 +36,7 @@ To find out what sequence a key combination sends, you can use :doc:`fish_key_re
|
||||
|
||||
If no ``SEQUENCE`` is provided, all bindings (or just the bindings in the given ``MODE``) are printed. If ``SEQUENCE`` is provided but no ``COMMAND``, just the binding matching that sequence is printed.
|
||||
|
||||
Key bindings may use "modes", which mimics Vi's modal input behavior. The default mode is "default". Every key binding applies to a single mode; you can specify which one with ``-M MODE``. If the key binding should change the mode, you can specify the new mode with ``-m NEW_MODE``. The mode can be viewed and changed via the ``$fish_bind_mode`` variable. If you want to change the mode from inside a fish function, use ``set fish_bind_mode MODE``.
|
||||
Key bindings may use "modes", which mimics vi's modal input behavior. The default mode is "default". Every key binding applies to a single mode; you can specify which one with ``-M MODE``. If the key binding should change the mode, you can specify the new mode with ``-m NEW_MODE``. The mode can be viewed and changed via the ``$fish_bind_mode`` variable. If you want to change the mode from inside a fish function, use ``set fish_bind_mode MODE``.
|
||||
|
||||
To save custom key bindings, put the ``bind`` statements into :ref:`config.fish <configuration>`. Alternatively, fish also automatically executes a function called ``fish_user_key_bindings`` if it exists.
|
||||
|
||||
@@ -266,7 +266,7 @@ The following special input functions are available:
|
||||
reexecutes the prompt functions and redraws the prompt (also ``force-repaint`` for backwards-compatibility)
|
||||
|
||||
``repaint-mode``
|
||||
reexecutes the :doc:`fish_mode_prompt <fish_mode_prompt>` and redraws the prompt. This is useful for vi-mode. If no ``fish_mode_prompt`` exists or it prints nothing, it acts like a normal repaint.
|
||||
reexecutes the :doc:`fish_mode_prompt <fish_mode_prompt>` and redraws the prompt. This is useful for vi mode. If no ``fish_mode_prompt`` exists or it prints nothing, it acts like a normal repaint.
|
||||
|
||||
``self-insert``
|
||||
inserts the matching sequence into the command line
|
||||
@@ -346,7 +346,7 @@ Perform a history search when :kbd:`Page Up` is pressed::
|
||||
|
||||
bind -k ppage history-search-backward
|
||||
|
||||
Turn on :ref:`Vi key bindings <vi-mode>` and rebind :kbd:`Control`\ +\ :kbd:`C` to clear the input line::
|
||||
Turn on :ref:`vi key bindings <vi-mode>` and rebind :kbd:`Control`\ +\ :kbd:`C` to clear the input line::
|
||||
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
bind -M insert \cc kill-whole-line repaint
|
||||
|
||||
@@ -20,11 +20,11 @@ Synopsis
|
||||
Description
|
||||
-----------
|
||||
|
||||
The ``fish_mode_prompt`` function outputs the mode indicator for use in vi-mode.
|
||||
The ``fish_mode_prompt`` function outputs the mode indicator for use in vi mode.
|
||||
|
||||
The default ``fish_mode_prompt`` function will output indicators about the current Vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. The ``$fish_bind_mode variable`` can be used to determine the current mode. It will be one of ``default``, ``insert``, ``replace_one``, or ``visual``.
|
||||
The default ``fish_mode_prompt`` function will output indicators about the current vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. The ``$fish_bind_mode variable`` can be used to determine the current mode. It will be one of ``default``, ``insert``, ``replace_one``, or ``visual``.
|
||||
|
||||
You can also define an empty ``fish_mode_prompt`` function to remove the Vi mode indicators::
|
||||
You can also define an empty ``fish_mode_prompt`` function to remove the vi mode indicators::
|
||||
|
||||
function fish_mode_prompt; end
|
||||
funcsave fish_mode_prompt
|
||||
|
||||
@@ -24,7 +24,7 @@ The following parameters are available:
|
||||
**--no-erase**
|
||||
Does not clear previous set bindings
|
||||
|
||||
Further information on how to use :ref:`vi-mode <vi-mode>`.
|
||||
Further information on how to use :ref:`vi mode <vi-mode>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Reference in New Issue
Block a user