Questions tagged [hydra]

for questions related to the use of the `hydra.el` package providing short keybindings for sequences of related commands

Filter by
Sorted by
Tagged with
0 votes
2 answers
43 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....
user avatar
0 votes
1 answer
17 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-...
user avatar
1 vote
1 answer
57 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?
user avatar
  • 567
0 votes
1 answer
177 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 ...
user avatar
0 votes
0 answers
188 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 ...
user avatar
1 vote
1 answer
60 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 ...
user avatar
  • 167
3 votes
2 answers
439 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 ...
user avatar
  • 1,333
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 ...
user avatar
  • 231
0 votes
1 answer
220 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 ...
user avatar
1 vote
0 answers
297 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-...
user avatar
  • 251
1 vote
2 answers
816 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 '(...
user avatar
  • 1,639
2 votes
2 answers
232 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 ...
user avatar
  • 1,605
3 votes
1 answer
891 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 ...
user avatar
  • 1,073
2 votes
1 answer
112 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 ...
user avatar
  • 503
0 votes
1 answer
141 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. ...
user avatar
  • 1,605
4 votes
1 answer
649 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 ...
user avatar
  • 4,535
5 votes
1 answer
877 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 ...
user avatar
  • 9,993
2 votes
1 answer
736 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 ...
user avatar
4 votes
1 answer
68 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 ...
user avatar
  • 6,661