mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 11:29:01 +00:00
Shift-TAB on multi-select mode
This commit is contained in:
parent
83825dbbd3
commit
8777a495bc
@ -112,7 +112,7 @@ The following readline key bindings should also work as expected.
|
|||||||
- CTRL-W / CTRL-U
|
- CTRL-W / CTRL-U
|
||||||
|
|
||||||
If you enable multi-select mode with `-m` option, you can select multiple items
|
If you enable multi-select mode with `-m` option, you can select multiple items
|
||||||
with TAB key.
|
with TAB or Shift-TAB key.
|
||||||
|
|
||||||
Usage as Vim plugin
|
Usage as Vim plugin
|
||||||
-------------------
|
-------------------
|
||||||
|
6
fzf
6
fzf
@ -542,7 +542,7 @@ begin
|
|||||||
cursor = ridx
|
cursor = ridx
|
||||||
},
|
},
|
||||||
127 => proc { input[cursor -= 1] = '' if cursor > 0 },
|
127 => proc { input[cursor -= 1] = '' if cursor > 0 },
|
||||||
9 => proc {
|
9 => proc { |o|
|
||||||
emit(:select) {
|
emit(:select) {
|
||||||
if sel = [*@matches.fetch(@vcursor, [])][0]
|
if sel = [*@matches.fetch(@vcursor, [])][0]
|
||||||
if @selects.has_key? sel
|
if @selects.has_key? sel
|
||||||
@ -550,7 +550,7 @@ begin
|
|||||||
else
|
else
|
||||||
@selects[sel] = 1
|
@selects[sel] = 1
|
||||||
end
|
end
|
||||||
@vcursor = [0, @vcursor - 1].max
|
@vcursor = [0, @vcursor + (o == :stab ? 1 : -1)].max
|
||||||
end
|
end
|
||||||
} if @multi
|
} if @multi
|
||||||
},
|
},
|
||||||
@ -562,6 +562,7 @@ begin
|
|||||||
actions[ctrl(:h)] = actions[127]
|
actions[ctrl(:h)] = actions[127]
|
||||||
actions[ctrl(:n)] = actions[ctrl(:j)]
|
actions[ctrl(:n)] = actions[ctrl(:j)]
|
||||||
actions[ctrl(:p)] = actions[ctrl(:k)]
|
actions[ctrl(:p)] = actions[ctrl(:k)]
|
||||||
|
actions[:stab] = actions[9]
|
||||||
|
|
||||||
while true
|
while true
|
||||||
# Update user input
|
# Update user input
|
||||||
@ -580,6 +581,7 @@ begin
|
|||||||
when 67 then :right
|
when 67 then :right
|
||||||
when 66 then ctrl(:j)
|
when 66 then ctrl(:j)
|
||||||
when 65 then ctrl(:k)
|
when 65 then ctrl(:k)
|
||||||
|
when 90 then :stab
|
||||||
else :nop
|
else :nop
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = 'fzf'
|
spec.name = 'fzf'
|
||||||
spec.version = '0.3.0'
|
spec.version = '0.3.1'
|
||||||
spec.authors = ['Junegunn Choi']
|
spec.authors = ['Junegunn Choi']
|
||||||
spec.email = ['junegunn.c@gmail.com']
|
spec.email = ['junegunn.c@gmail.com']
|
||||||
spec.description = %q{Fuzzy finder for your shell}
|
spec.description = %q{Fuzzy finder for your shell}
|
||||||
|
Loading…
Reference in New Issue
Block a user