Segregate key bindings per operation mode #10083
-
Hi, Is it possible to I have I want to The problem with the above configuration is that Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You want bind \em 'if commandline --paging-mode; commandline -f down-line; else; ...; end' You can also make this a function and bind that, see e.g. down-or-search. |
Beta Was this translation helpful? Give feedback.
-
HI, A related question that I struggle to find a solution. Is it possible to bind I have the below configuration that works in the normal mode of the vi mode, but does not work in the insert mode. It is quite convenient to search the command history directly from the insert mode without having to switch to the normal mode. function fzf_history
history --null | fzf --query=(commandline) --read0 --print0 \
--cycle --bind=alt-m:down,alt-,:up --ansi | \
read --null --local result; and commandline -- $result
end
bind \cR fzf_history Following the above suggested pattern there is no option like |
Beta Was this translation helpful? Give feedback.
You want
commandline --paging-mode
, likeYou can also make this a function and bind that, see e.g. down-or-search.