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
1 answer
49 views

modify some binds in a package's hydra

I use a package that comes with a handy hydra (and install it with use-package at the moment), but i want to change only some of the keys from that hydra. the hydra looks like : (defhydra indent-tools-...
John Doe's user avatar
  • 169
0 votes
1 answer
54 views

How can an interactive function detect that it is invoked via an hydra?

Assume there's an interactive function foo. Assume it is bound in various keymaps and is also bound inside an hydra as a simple key, let's say "a". How can foo's code detect that it was ...
PRouleau's user avatar
  • 796
0 votes
1 answer
24 views

Is it possible to run a helm or other completion command for hydra window?

Spacemacs offers many hydra window to show various keys. (And my question is not specific to spacemacs, just hydra in general) Sometimes there are many commands so it's hard to find what's there. Is ...
eugene's user avatar
  • 489
0 votes
0 answers
20 views

hydra, let all keys work but not allow insert (self-insert-command)

I am setting up hydra + dap. Although dap-hydra is provided, it messes up keybinding often times. Often, I forget the hydra window is open and type something and messes up typing. Furthermore, when ...
eugene's user avatar
  • 489
0 votes
1 answer
20 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 &...
ShadowRylander's user avatar
1 vote
2 answers
492 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....
page290's user avatar
  • 11
0 votes
1 answer
22 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-...
american-ninja-warrior's user avatar
1 vote
1 answer
131 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?
zcaudate's user avatar
  • 647
0 votes
1 answer
270 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 ...
Fred Hansen's user avatar
0 votes
0 answers
298 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 ...
Mathieu Marques's user avatar
1 vote
1 answer
87 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 ...
KhalfaniW's user avatar
  • 357
3 votes
2 answers
546 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 ...
wolfv's user avatar
  • 1,393
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 ...
Florian's user avatar
  • 241
0 votes
1 answer
283 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 ...
Jonathan Arkell's user avatar
1 vote
0 answers
319 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-...
Angelo's user avatar
  • 301
1 vote
2 answers
1k 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 '(...
bertfred's user avatar
  • 1,729
2 votes
2 answers
327 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 ...
zeltak's user avatar
  • 1,745
3 votes
1 answer
949 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 ...
iLemming's user avatar
  • 1,263
2 votes
1 answer
147 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 ...
Oly's user avatar
  • 593
0 votes
1 answer
170 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. ...
zeltak's user avatar
  • 1,745
4 votes
1 answer
747 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 ...
elethan's user avatar
  • 4,825
5 votes
1 answer
1k 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 ...
PythonNut's user avatar
  • 10.4k
2 votes
1 answer
1k 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 ...
SlowLearner's user avatar
4 votes
1 answer
74 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 ...
Sean Allred's user avatar
  • 6,921