From 6ca9f9ee38cf3021731842477bcefc14368530e2 Mon Sep 17 00:00:00 2001 From: mtoohey31 Date: Mon, 31 May 2021 19:46:33 -0400 Subject: [PATCH] fish_vi_key_bindings: bind s to follow vim visual behaviour This change adds a binding that sets the s key's behaviour to match the c key's in visual mode. This mirrors vim's behaviour (see `:h v_s` in vim or neovim). --- share/functions/fish_vi_key_bindings.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index 6835a1173..e11597238 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -302,6 +302,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' end bind -s --preset -M visual -m insert c kill-selection end-selection repaint-mode + bind -s --preset -M visual -m insert s kill-selection end-selection repaint-mode bind -s --preset -M visual -m default d kill-selection end-selection repaint-mode bind -s --preset -M visual -m default x kill-selection end-selection repaint-mode bind -s --preset -M visual -m default X kill-whole-line end-selection repaint-mode