Doom-emacs: [HOWTO] Make the leader key popup faster and timeout?

Created on 30 Sep 2019  Â·  4Comments  Â·  Source: hlissner/doom-emacs

What I want to achieve
When I press spc I want that popup to happen more quickly before waiting for another key. Is there a way to modify the timeout here?

Similarly if I don't type a sequence fast enough, I'd like the command to expire so I can retry more quickly.

System information

emacs   version    26.3
        features   JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2
        build      Aug 30, 2019
        buildopts  (--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus/26.3/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus/26.3 --with-xml2 --without-dbus --with-gnutls --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained)
        windowsys  ns
        daemonp    server-running
doom    version    2.0.9
        build      HEAD -> develop 3f7e0fd10 2019-09-29 23:12:43 -0400
system  type       darwin
        config     x86_64-apple-darwin18.5.0
        shell      /usr/local/bin/fish
        uname      Darwin 19.0.0 Darwin Kernel Version 19.0.0: Tue Sep 17 01:59:51 PDT 2019; root:xnu-6153.11.24~17/RELEASE_X86_64 x86_64
        path       (~/.dotfiles/bin ~/.emacs.d/bin /usr/local/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Library/Apple/usr/bin /Library/Apple/bin ~/.pyenv/shims /Applications/kitty.app/Contents/MacOS /usr/local/Cellar/emacs-plus/26.3/libexec/emacs/26.3/x86_64-apple-darwin18.5.0/)
config  envfile    envvar-file
        elc-files  0
        modules    (:completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor (evil +everywhere) file-templates fold multiple-cursors rotate-text snippets :emacs dired electric vc :tools docker eval flycheck flyspell (lookup +docsets) magit rgb :lang data emacs-lisp go javascript markdown (org +dragndrop +ipython +pandoc +present) python rest rust sh web :config (default +bindings +smartparens))
        packages   (n/a)
        elpa       (n/a)

question keybinds

All 4 comments

When I press spc I want that popup to happen more quickly before waiting for another key. Is there a way to modify the timeout here?

(setq which-key-idle-delay 0.1)

Occasionally, which-key will not obey this on first load. In which case, just load it before setting it:

(require 'which-key)
(setq which-key-idle-delay 0.1)

Similarly if I don't type a sequence fast enough, I'd like the command to expire so I can retry more quickly.

This is an problem with base Emacs. There is no "timing out" when it comes to key sequences.

@hlissner so the appropriate key combo afterwards is just press esc twice or so until it resets saying something like command not found?

Yes. Either ESC or C-g. Since they are the "universal" abort keys in Emacs, they are rarely bound to, and are most likely to emit the command not found error (which we want).

Thank you very much. Appreciate the help.

Was this page helpful?
0 / 5 - 0 ratings