Questions tagged [hydra]
for questions related to the use of the `hydra.el` package providing short keybindings for sequences of related commands
21
questions
0
votes
1
answer
15
views
custom use-package keyword only initializing last form
My package deino is a fork of hydra, which allows me to create temporary keymaps; here it is being used along with my package prime:
With following macro:
(defmacro prime* (parent first-call key func &...
0
votes
0
answers
23
views
Remove double invocations from a multiple-cursors hydra
I created a hydra for multiple-cursors for a config. However when I
press the prefix keys, C-c m n
then the [head] (action) key...
the action is doubly invoked.
Said another way, if I my hydra key ...
0
votes
2
answers
219
views
Using hydra to split windows like in doom-emacs and Spacemacs
I am writing my own Emacs config coming from doom-emacs and Spacemacs. One thing I really miss is the ability to split windows using split-window-below and split-window-right using S-w s s and S-w s v....
0
votes
1
answer
19
views
mark-whole-region and pbcopy without losing current point/region
I wrote a hydra today (I think my very first one) - I always do Meta-| pbcopy after doing a C-x h, so why not let hydra help out:
(global-set-key
(kbd "C-x h")
(defhydra hydra-...
1
vote
1
answer
86
views
How to check if a hydra is displaying?
If a hydra is opened, how do we check programmatically that it is actually open and displaying?
0
votes
1
answer
210
views
using ivy completion on a hydra
I'd like to use ivy completion to select items from my hydra rather than using the specified keymap. The use case would be for a very large hydra. I could create nested hydras, but I want to be lazy ...
0
votes
0
answers
231
views
How to trigger a hydra when entering evil-mode normal state?
I have the following:
(use-package evil
:hook
(after-init . evil-mode)
(evil-normal-state-entry . hydra-evil/body))
When leaving the emacs state (with C-z) and entering normal state, all my ...
1
vote
1
answer
72
views
How do you handle a key sequence inside a function?
I want to run a function and do different actions based on the next key sequence.
I have this.
(defun ask-for-C-b-or-M-b (key-sequence)
(interactive "KPress Key")
(cond
((seq-set-equal-p ...
3
votes
2
answers
472
views
How to select a rotating Hydra option?
From SPC f f (counsel-find-file) minibuffer, open Hydra with C-o (hydra-ivy/body).
This is what hydra looks on my system:
The Hydra right column has "[m] matcher: order".
Pressing 'm' rotates matcher ...
2
votes
2
answers
2k
views
How to properly define hydras inside use-package?
For example, I use undo-tree and have the following in my config file:
(use-package undo-tree
:ensure t
:diminish (undo-tree-mode . "")
:config
(global-undo-tree-mode 1))
Now I want to use ...
0
votes
1
answer
241
views
Hydra that executes interactive search
What I want is an easy-to-use hydra for macro execution. Typically I execute a keyboard macro a few times (e), and then might want to repeat infinitely until the end of a buffer (u). Sometimes I ...
1
vote
0
answers
302
views
ivy-hydra: error upon C-o
While trying to figure out another problem. I was advised to use the ivy-hydra package.
By default, it appears that ivy-hydra is NOT included with prelude-ivy. So I did a package-install ret ivy-...
1
vote
2
answers
868
views
Returning to the parent hydra
I'm looking for a way to return to the parent hydra after using certain commands. In this example
(defhydra hydra-a (:color teal)
"a"
("b" (progn
(hydra-b/body)
(hydra-push '(...
2
votes
2
answers
268
views
advice on easy formating of hydra docstring
so i used to use the auto generation of hydra hints with the
:hint nil and :column 3 argument
i recently find a need to have better control on whats presented in the hint area of some huge hydras i ...
3
votes
1
answer
916
views
Little help with a hydra
I need a hydra with four "heads", each of should exit the hydra when its function is executed.
The hydra intended to be used in dired-mode and direx:direx-mode and pop-up when O pressed. This is what ...
2
votes
1
answer
123
views
How can i make toggle shortcuts like org mode or magit
I am writing an elisp package currently I am using hydra, I would like to be able to have shortcuts you can toggle on and off for various flags.
You see this sort of thing in magit and org mode when ...
0
votes
1
answer
153
views
bookmark+: after emacs restart the bmkp-jump-dired/bmkp-jump wont work before visiting buffers
this is a weird issue regarding Bookmark+. after an emacs restart the bmkp-jump-dired/bmkp-jump-1 functions wont work (when I launch them via a command such as in a hydra) before visiting the buffers.
...
4
votes
1
answer
675
views
Make hints appear immedietly when using Hydra
I use Hydra, and find it very useful. However, I often find that I can only remember the key to trigger the hydra itself, but can't remember which keys are used for the "heads".
Luckily, Hydra will ...
5
votes
1
answer
927
views
Use hydra with evil motions
I'm trying to use a hydra to dispatch among a selection of motions. See this minimal example:
(defhydra hydra/test (:color blue)
"This is a test hydra"
("n" evil-next-line))
(evil-define-motion ...
2
votes
1
answer
979
views
How to open a given directory in Dired?
I want to use hydra (in Emacs 24.5.1 on Windows 10) to create a pop-up list of directories that I often use. Selecting one of the directories in the list, using a single key, should cause it to open ...
4
votes
1
answer
69
views
Why does this function work with :post but not :pre?
(defhydra windows (global-map "C-c w" :post flash-active-buffer)
"window moving"
("o" other-window "other"))
(make-face 'flash-active-buffer-face)
(set-face-attribute 'flash-active-buffer-face ...