Add project shortcut for magit
This commit is contained in:
parent
f83a39e6a7
commit
b37fd1202f
11
init.el
11
init.el
@ -322,11 +322,13 @@
|
|||||||
(project-find-file "Find file")
|
(project-find-file "Find file")
|
||||||
(project-find-regexp "Find regexp")
|
(project-find-regexp "Find regexp")
|
||||||
(project-find-dir "Find directory")
|
(project-find-dir "Find directory")
|
||||||
(project-vc-dir "VC-Dir")
|
(project-magit "Magit")
|
||||||
(project-eshell "Eshell")
|
(project-eshell "Eshell")
|
||||||
(project-any-command "Other"))
|
(project-any-command "Other"))
|
||||||
project-vc-merge-submodules nil
|
project-vc-merge-submodules nil
|
||||||
project-mode-line nil)
|
project-mode-line nil)
|
||||||
|
:bind (:map project-prefix-map
|
||||||
|
(("m" . project-magit)))
|
||||||
:config (progn
|
:config (progn
|
||||||
|
|
||||||
;; Sort known projects before persisting, to reduce committer noise
|
;; Sort known projects before persisting, to reduce committer noise
|
||||||
@ -335,7 +337,12 @@
|
|||||||
sort-before-writing)
|
sort-before-writing)
|
||||||
(setq project--list (cl-sort project--list
|
(setq project--list (cl-sort project--list
|
||||||
#'string<
|
#'string<
|
||||||
:key #'cl-first)))))
|
:key #'cl-first)))
|
||||||
|
|
||||||
|
(defun project-magit ()
|
||||||
|
"Run `magit' in project root"
|
||||||
|
(interactive)
|
||||||
|
(magit-status (project-root (project-current t))))))
|
||||||
|
|
||||||
(use-package quail
|
(use-package quail
|
||||||
:init (setq default-input-method "TeX"))
|
:init (setq default-input-method "TeX"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user