mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Set fish_vi_key_bindings to start in insert mode by default
Add optional argument for fish_vi_key_bindings to set desired initial mode: > fish_vi_key_bindings default
This commit is contained in:
parent
023af5585f
commit
2872a98b2b
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
function fish_vi_key_bindings -d "vi-like key bindings for fish"
|
||||
function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
||||
bind --erase --all
|
||||
set -l init_mode insert
|
||||
if set -q argv[1]
|
||||
set init_mode $argv[1]
|
||||
end
|
||||
|
||||
|
||||
##
|
||||
## command mode
|
||||
|
@ -214,4 +219,5 @@ function fish_vi_key_bindings -d "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
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue