From 35b214ae9f8f4eaf4e3f0fd22165184f05e219fe Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 24 Aug 2020 00:42:50 +0100 Subject: feat(tazjin/emacs): Add magit-find-file-worktree function This will look up a file in the current worktree of the git repository enclosing `default-directory'. In combination with project-find-file this lets me toggle between switching to a file within a project, and within the whole depot. Change-Id: Ie1011f10051fc2c4bd4279b0944a79c7edf92f3b Reviewed-on: https://cl.tvl.fyi/c/depot/+/1838 Tested-by: BuildkiteCI Reviewed-by: tazjin --- users/tazjin/emacs/config/bindings.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/tazjin/emacs/config/bindings.el') diff --git a/users/tazjin/emacs/config/bindings.el b/users/tazjin/emacs/config/bindings.el index f66a6ab551..a2f7369348 100644 --- a/users/tazjin/emacs/config/bindings.el +++ b/users/tazjin/emacs/config/bindings.el @@ -32,12 +32,12 @@ (global-set-key (kbd "C-x r q") 'save-buffers-kill-terminal) (global-set-key (kbd "C-x C-c") 'ignore) -;; Open Fefes Blog -(global-set-key (kbd "C-c C-f") 'fefes-blog) - ;; Open a file in project: (global-set-key (kbd "C-c f") 'project-find-file) +;; Open a file via magit: +(global-set-key (kbd "C-c C-f") #'magit-find-file-worktree) + ;; Insert TODO comments (global-set-key (kbd "C-c t") 'insert-todo-comment) -- cgit 1.4.1