From e7df20f69b16458078361670acee22f9ff383ec6 Mon Sep 17 00:00:00 2001 From: Max Gonzih Date: Sun, 19 Jan 2014 16:50:56 +0300 Subject: [PATCH 1/3] Add x binding to delete selection in visual vi mode --- 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 c89f6f16b..b001855d8 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -203,6 +203,7 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish" bind E forward-word bind -M visual -m default d kill-selection end-selection force-repaint + bind -M visual -m default x kill-selection end-selection force-repaint bind -M visual -m default y kill-selection yank end-selection force-repaint bind -M visual -m default '"*y' "commandline -s | xsel -p" end-selection force-repaint From 69778efb6b35fcdbad35dfed3b5b4a5395aa0ee0 Mon Sep 17 00:00:00 2001 From: Max Gonzih Date: Sun, 19 Jan 2014 17:04:02 +0300 Subject: [PATCH 2/3] Add x binding to delete whole line in visual mode --- 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 b001855d8..d5c443071 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -204,6 +204,7 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish" bind -M visual -m default d kill-selection end-selection force-repaint bind -M visual -m default x kill-selection end-selection force-repaint + bind -M visual -m default X kill-whole-line end-selection force-repaint bind -M visual -m default y kill-selection yank end-selection force-repaint bind -M visual -m default '"*y' "commandline -s | xsel -p" end-selection force-repaint From 114f803a88edd1436f16d06eb1dd21c00c30ab34 Mon Sep 17 00:00:00 2001 From: Max Gonzih Date: Sun, 19 Jan 2014 17:07:23 +0300 Subject: [PATCH 3/3] Fix e and E in visual vi mode --- share/functions/fish_vi_key_bindings.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index d5c443071..cb6309782 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -199,8 +199,8 @@ function fish_vi_key_bindings -d "vi-like key bindings for fish" bind gE backward-word bind w forward-word bind W forward-word - bind e forward-word - bind E forward-word + bind -M visual e forward-word + bind -M visual E forward-word bind -M visual -m default d kill-selection end-selection force-repaint bind -M visual -m default x kill-selection end-selection force-repaint