diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 15aa2b5a..ed3844d5 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2466,11 +2466,28 @@ I don't use iedit directly, but it is used by [[*emr][emr]] and I need to disabl :config (progn (use-package company-restclient))) - #+END_SRC *** key-chord #+BEGIN_SRC emacs-lisp - (use-package key-chord) + (use-package key-chord + :preface + (defun imalison:disable-keychord-around (function &rest args) + (let ((key-chord-mode-was-enabled (bound-and-true-p key-chord-mode))) + (when key-chord-mode-was-enabled + (shut-up (key-chord-mode -1))) + (condition-case err (progn (apply function args)) + (error)) + (when key-chord-mode-was-enabled + (shut-up (key-chord-mode 1))))) + :config + (progn + (key-chord-mode 1) + (advice-add 'imalison:avy :around 'imalison:disable-keychord-around) + (key-chord-define-global "tg" 'imalison:term-hydra/body) + (key-chord-define-global "pj" 'imalison:projectile-find-file) + (key-chord-define-global "p[" 'projectile-switch-project) + (key-chord-define-global "sd" 'imalison:do-ag) + (key-chord-define-global "jh" 'imalison:avy))) #+END_SRC *** nodejs-repl #+BEGIN_SRC emacs-lisp