[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Changing key-bindings for icicle-search mode
From: |
Drew Adams |
Subject: |
RE: Changing key-bindings for icicle-search mode |
Date: |
Fri, 25 Dec 2015 10:09:04 -0800 (PST) |
> I have come to use icicle, and like it for its less intrusive interface
> (well, most of the time.)
>
> While in icicle-occur (and icicle-search) The search results are shown
> in a temporary buffer. Where if I intend to navigate in coordination.
> i.e. to say jump locations (next or prior) based on the search results,
> I call, interactively, (icicle-previous-apropos-candidate-action
> &optional NTH) OR (icicle-next-apropos-candidate-action &optional NTH)
>
> The key bindings for the respective commands are <C-prior> and <C-next>
> respectively.
>
> I find these key-bindings a little too cumbersome. ... I want to
> change them for the specific mode, i.e. icicle search mode (and I
> dont know the name either)
TL;DR - Hit `M-g' and then use the arrow keys (up/down).
---
You can change the keys you ask about by customizing (`M-x
customize-option) options `icicle-apropos-cycle-next-action-keys'
and `icicle-apropos-cycle-previous-action-keys'. Their default
values are the lists ([C-next]) and ([C-prior]), respectively.
You can add keys to those lists or replace the ones that are there
by default.
Also (if `icicle-default-cycling-mode' is `apropos' or if you have
hit `S-TAB') you can just use the keys `C-S-down' and `C-S-up' for
this (or use `C-S-' plus the mouse wheel). These keys are defined
by options `icicle-modal-cycle-down-alt-action-keys' and
`icicle-modal-cycle-up-alt-action-keys' (same option names, but
with `-alt').
Customizing any of these keys affects all Icicles cycling actions;
they are not specific to search. If you want to change such a key
for search only then you will need to advise `icicle-search' (or a
specific Icicles search command). Use an `around' advice that
binds the key options to whatever values you want.
---
The keys for cycling among apropos candidates without acting on
them are the same, but without the `C-' prefix, i.e., `next' and
`down'. But you can always just use the `down' and `up' arrows
for that instead, if the candidates are apropos completions
(e.g., if you have used `S-TAB' or if you have customized option
`icicle-default-cycling-mode' to `apropos').
You can use `M-g' in the minibuffer to toggle the use of prefix
`C-' for this. So to cycle among some search hits (the source
targets) you can use `M-g' and then just repeatedly hit `next'
or `prior' (or `down' or `up') instead of repeating the same
keys using modifier `C-'. Hit `M-g' to toggle back to the usual
behavior.
IOW, you can hit `M-g' to then use just the down/up arrows, to
get the behavior you want. Hitting `M-g' again makes these
arrows cycle only among candidates (inserting them one-by-one
in the minibuffer), without moving to the corresponding target
search hits.