Use fish_vi_cursor by default

Fixes #3215.
This commit is contained in:
Fabian Homborg
2016-09-05 01:22:07 +02:00
parent b0716885bc
commit cac3b239e3
2 changed files with 9 additions and 3 deletions

View File

@@ -1038,7 +1038,7 @@ function fish_user_key_bindings
end
\endfish
When in vi-mode, the <a href="fish_mode_prompt.html">`fish_mode_prompt`</a> function will display a mode indicator to the left of the prompt. The `fish_vi_cursor` function is available to change the cursor's shape depending on the mode in supported terminals.
When in vi-mode, the <a href="fish_mode_prompt.html">`fish_mode_prompt`</a> 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.
\subsubsection vi-mode-command Command mode

View File

@@ -226,10 +226,16 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
bind -M visual -m default \cc end-selection force-repaint
bind -M visual -m default \e end-selection force-repaint
set fish_bind_mode $init_mode
# Make it easy to turn an unexecuted command into a comment in the shell history. Also, remove
# the commenting chars so the command can be further edited then executed.
bind -M default \# __fish_toggle_comment_commandline
bind -M visual \# __fish_toggle_comment_commandline
# Set the cursor shape
# After executing once, this will have defined functions listening for the variable.
# Therefore it needs to be before setting fish_bind_mode.
fish_vi_cursor
set fish_bind_mode $init_mode
end