https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-hydra.el
Body | Non-color | Head | Executing | After |
Color | Alternative | Inherited | NON-HEADS | executing |
Color | HEADS | |||
---|---|---|---|---|
red | :foreign-keys nil (default) | red | Allow and Quit | |
:exit nil (default) | Continue | |||
blue | :foreign-keys nil (default) | blue | Allow and Quit | |
:exit t | Quit | |||
amaranth | :foreign-keys warn | red | Disallow and Continue | |
:exit nil (default) | Continue | |||
teal | :foreign-keys warn | blue | Disallow and Continue | |
:exit t | Quit | |||
pink | :foreign-keys run | red | Allow and Continue | |
:exit nil (default) | Continue |
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-ivy.el
Call `ivy-immediate-done’ if you want to use whatever you typed in the search field, and ignore the suggestions provided by ivy in the list.
C-u <`ivy-alt-done’ binding> <– `ivy-immediate-done’
This is useful especially when renaming files (and the name you want to rename to partially matches one of the existing files).
Command | ivy map | Function |
Bindings | ||
---|---|---|
ivy-done | C-m or RET | Exit the minibuffer with the selected candidate. |
Try to leave `ivy’ as soon as possible. | ||
ivy-alt-done | C-j | Exit the minibuffer with the selected candidate. |
When ARG is t, acts like `ivy-immediate-done’. | ||
Try NOT to leave `ivy’ at the soonest. For | ||
instance, if a directory name completion is | ||
possible, do that and list that directory’s | ||
content in `ivy’ instead of opening that dir | ||
in `dired’. | ||
ivy-immediate-done | C-M-j | Exit the minibuffer with the current text, |
ignoring the candidates. | ||
ivy-partial-or-done | TAB | Attempts partial completion, extending current line |
input as much as possible. “TAB TAB” is the same as | ||
`ivy-alt-done’. | ||
ivy-call | C-M-m | Call the current action without exiting completion. |
ivy-next-line-and-call | C-M-n | Move cursor vertically down ARG candidates. |
Call the permanent action if possible. | ||
ivy-previous-line-and-call | C-M-p | Move cursor vertically up ARG candidates. |
Call the permanent action if possible. | ||
ivy-dispatching-done | M-o | Presents valid actions from which to choose. When |
only one action is available, there is no difference | ||
between this and `ivy-done’. | ||
ivy-reverse-i-search | C-r | start a recursive completion session to select a history element. |
ivy-insert-current | M-i | insert the current candidate into the minibuffer. |
Useful for copying and renaming files, | ||
for example: M-i to insert the original file name string, | ||
edit it, and then C-m to complete the renaming.. | ||
ivy-yank-word | M-j | insert the sub-word at point into the minibuffer. |
ivy-restrict-to-matches | S-SPC | deletes the current input, and resets the candidates list |
to the currently restricted matches. | ||
This is how Ivy provides narrowing in successive tiers. |
Switch to any of the saved `ivy-views’ using `M-x ivy-switch-buffer’. When `ivy-mode’ is enabled, binding for `switch-to-buffer’ is remapped to `ivy-switch-buffer’.
https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-shackle.el
Elements of the `shackle-rules’ alist:
CONDITION | symbol | Major mode of the buffer to match |
string | Name of the buffer | |
- which can be turned into regexp matching | ||
by using the :regexp key with a value of t | ||
in the key-value part | ||
list of either | a list groups either symbols or strings | |
symbol or string | (as described earlier) while requiring at | |
least one element to match | ||
t | t as the fallback rule to follow when no | |
other match succeeds. | ||
If you set up a fallback rule, make sure | ||
it’s the last rule in shackle-rules, | ||
otherwise it will always be used. | ||
---|---|---|
KEY-VALUE | :select t | Select the popped up window. The |
`shackle-select-reused-windows’ option makes | ||
this the default for windows already | ||
displaying the buffer. | ||
:inhibit-window-quit t | Special buffers usually have `q’ bound to | |
`quit-window’ which commonly buries the buffer | ||
and deletes the window. This option inhibits the | ||
latter which is especially useful in combination | ||
with :same, but can also be used with other keys | ||
like :other as well. | ||
:ignore t | Skip handling the display of the buffer in | |
question. Keep in mind that while this avoids | ||
switching buffers, popping up windows and | ||
displaying frames, it does not inhibit what may | ||
have preceded this command, such as the | ||
creation/update of the buffer to be displayed. | ||
:same t | Display buffer in the current window. | |
:popup t | Pop up a new window instead of displaying | |
mutually exclusive | the buffer in the current one. | |
:other t | Reuse the window `other-window’ would select if | |
*must not be used | there’s more than one window open, otherwise pop | |
with :align, :size* | up a new window. When used in combination with | |
the :frame key, do the equivalent to | ||
other-frame or a new frame | ||
:align | Align a new window at the respective side of | |
‘above, ‘below, | the current frame or with the default alignment | |
‘left, ‘right, | (customizable with `shackle-default-alignment’) | |
or t (default) | by deleting every other window than the | |
currently selected one, then wait for the window | ||
to be “dealt” with. This can either happen by | ||
burying its buffer with q or by deleting its | ||
window with C-x 0. | ||
:size | Aligned window use a default ratio of 0.5 to | |
a floating point | split up the original window in half | |
value between 0 and 1 | (customizable with `shackle-default-size’), the | |
is interpreted as a | size can be changed on a per-case basis by | |
ratio. An integer >=1 | providing a different floating point value like | |
is interpreted as a | 0.33 to make it occupy a third of the original | |
number of lines. | window’s size. | |
:frame t | Pop buffer to a frame instead of a window. |