summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-03-08 00:57:53 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-03-08 01:02:32 +0900
commit19e24bd6441ec63a41fc1b58a41ab5a4b4b1f51e (patch)
treee755cd4e2355cc61d9e137a85f2eccee6d83993e
parent457a2404571c27c4ad867415f793be1673dc795c (diff)
Home/End/PgUp/PgDn/Del/(Ins)
-rwxr-xr-xfzf11
1 files changed, 10 insertions, 1 deletions
diff --git a/fzf b/fzf
index cd334021..5d1a8cd7 100755
--- a/fzf
+++ b/fzf
@@ -7,7 +7,7 @@
# / __/ / /_/ __/
# /_/ /___/_/ Fuzzy finder for your shell
#
-# Version: 0.8.0 (March 7, 2014)
+# Version: 0.8.0 (March 8, 2014)
#
# Author: Junegunn Choi
# URL: https://github.com/junegunn/fzf
@@ -816,6 +816,12 @@ class FZF
when 66 then ctrl(:j)
when 65 then ctrl(:k)
when 90 then :stab
+ when 49 then read_nb(1); ctrl(:a)
+ when 50 then read_nb(1); :ins
+ when 51 then read_nb(1); :del
+ when 52 then read_nb(1); ctrl(:e)
+ when 53 then read_nb(1); :pgup
+ when 54 then read_nb(1); :pgdn
when 77
get_mouse
end
@@ -912,6 +918,9 @@ class FZF
ctrl(:b) => proc { cursor = [0, cursor - 1].max; nil },
ctrl(:f) => proc { cursor = [input.length, cursor + 1].min; nil },
ctrl(:l) => proc { render { C.clear; C.refresh }; update_list true },
+ :del => proc { input[cursor] = '' if input.length > cursor },
+ :pgup => proc { vselect { |_| max_items } },
+ :pgdn => proc { vselect { |_| 0 } },
:alt_b => proc { backword.call; nil },
:alt_f => proc {
cursor += (input[cursor..-1].index(/(\S\s)|(.$)/) || -1) + 1