diff --git a/users/tazjin/emacs/config/bindings.el b/users/tazjin/emacs/config/bindings.el index 21cca06cc..916d94775 100644 --- a/users/tazjin/emacs/config/bindings.el +++ b/users/tazjin/emacs/config/bindings.el @@ -49,6 +49,9 @@ ;; Open the depot (global-set-key (kbd "s-s d") #'tvl-depot-status) +;; Open any repo through zoxide +(global-set-key (kbd "s-s r") #'zoxide-open-magit) + ;; Add subthread collapsing to notmuch-show. ;; ;; C-, closes a thread, C-. opens a thread. This mirrors stepping diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el index 5963d142c..ba7301e79 100644 --- a/users/tazjin/emacs/config/functions.el +++ b/users/tazjin/emacs/config/functions.el @@ -325,4 +325,9 @@ the GPG agent correctly." (if-let ((pr (project-current))) (project-root pr))))) +(defun zoxide-open-magit () + "Query Zoxide for paths and open magit in the result." + (interactive) + (zoxide-open-with nil #'magit-status-setup-buffer)) + (provide 'functions)