mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user