Change / simplify some key binds

Simplify magit, org, org-roam, eshell binds to single bind at top
level key

Change consult binds to C-c c ... from C-c s ...

Add Projects directory bind
This commit is contained in:
Evie Litherland-Smith 2024-09-06 07:14:37 +01:00
parent a001486f56
commit bd3c281bdc

View file

@ -623,12 +623,11 @@ Configure email with iCalendar event support, to integrate with
(mouse-wheel-progressive-speed nil)
(mouse-wheel-follow-mouse t))
;; Quick bind for calling `git-sync-all'
;; Function for calling `git-sync-all'
(defun my/git-sync-all ()
"Run shell command `git-sync-all' asynchronously."
(interactive)
(async-shell-command "git-sync-all" "*git-sync-all*" "*git-sync-errors*"))
(keymap-global-set "C-c g s" #'my/git-sync-all)
;; Make shebang (#!) file executable when saved
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
@ -692,11 +691,8 @@ Configure email with iCalendar event support, to integrate with
:defines ibuffer-filter-groups
:bind (("C-c b" . ibuffer)))
(use-package shell
:bind (("C-c t s" . shell)))
(use-package eshell
:bind (("C-c t e" . eshell))
:bind (("C-c t" . eshell))
:config
(require 'esh-mode))
@ -765,10 +761,6 @@ Configure email with iCalendar event support, to integrate with
(winner-mode))
(use-package ediff
:bind (("C-c d f" . ediff-files)
("C-c d b" . ediff-buffers)
("C-c d 3 f" . ediff-files3)
("C-c d 3 b" . ediff-buffers3))
:custom
(ediff-window-setup-function #'ediff-setup-windows-plain))
@ -915,7 +907,7 @@ Configure email with iCalendar event support, to integrate with
(use-package org-capture
:after org
:bind (("C-c o n" . org-capture))
:bind (("C-c n" . org-capture))
:custom (org-capture-templates
'(("t" "TODO" entry
(file+olp "tasks.org.gpg" "Inbox")
@ -932,14 +924,14 @@ Configure email with iCalendar event support, to integrate with
:after org
:defines org-roam-directory
:functions org-roam-db-autosync-mode
:bind (("C-c o r i" . org-roam-node-insert)
("C-c o r f" . org-roam-node-find)
("C-c o r n" . org-roam-capture)
("C-c o r j" . org-roam-dailies-capture-today)
:bind (("C-c r i" . org-roam-node-insert)
("C-c r f" . org-roam-node-find)
("C-c r n" . org-roam-capture)
("C-c r j" . org-roam-dailies-capture-today)
("M-g j" . org-roam-dailies-goto-today)
("M-g C-j" . org-roam-dailies-goto-date)
:map org-mode-map
("C-c o r b" . org-roam-buffer-toggle))
("C-c r b" . org-roam-buffer-toggle))
:custom
(org-roam-directory (expand-file-name "roam" org-directory))
(org-roam-completion-everywhere nil)
@ -988,8 +980,7 @@ Configure email with iCalendar event support, to integrate with
(use-package org-agenda
:after (org appt)
:bind (("C-c o a" . org-agenda)
("C-c o C-a" . org-agenda-list))
:bind (("C-c a" . org-agenda))
:hook (org-agenda-finalize . org-agenda-to-appt)
:custom
(org-agenda-span 'day)
@ -1237,12 +1228,12 @@ Configure email with iCalendar event support, to integrate with
:bind (("<remap> <imenu>" . consult-imenu)
("<remap> <switch-to-buffer>" . consult-buffer)
("<remap> <project-switch-to-buffer>" . consult-project-buffer)
("C-c s l" . consult-line)
("C-c s o" . consult-outline)
("C-c s f" . consult-fd)
("C-c s g" . consult-ripgrep)
("C-c s e" . consult-flymake)
("C-c s i" . consult-info)
("C-c c l" . consult-line)
("C-c c o" . consult-outline)
("C-c c f" . consult-fd)
("C-c c g" . consult-ripgrep)
("C-c c e" . consult-flymake)
("C-c c i" . consult-info)
:map minibuffer-local-map
("<remap> <previous-matching-history-element>" . consult-history)
:map comint-mode-map
@ -1385,7 +1376,6 @@ Configure email with iCalendar event support, to integrate with
:if (package-installed-p 'apheleia)
:defines (apheleia-formatters
apheleia-mode-alist)
:bind (("C-c c f" . apheleia-format-buffer))
:hook (prog-mode)
:custom (apheleia-remote-algorithm 'cancel)
:config
@ -1459,10 +1449,7 @@ Configure email with iCalendar event support, to integrate with
(add-to-list 'package-selected-packages 'magit)
(use-package magit
:if (package-installed-p 'magit)
:bind (("C-c g g" . magit-status)
("C-c g d" . magit-dispatch)
("C-c g f" . magit-file-dispatch)
("C-c g b" . magit-blame-addition)
:bind (("C-c g" . magit-status)
:map project-prefix-map
("m" . magit-project-status))
:custom
@ -1700,6 +1687,11 @@ Configure email with iCalendar event support, to integrate with
"Open Downloads directory."
(interactive)
(find-file "~/Downloads/"))
(defun my/open-projects-directory ()
"Open Projects directory."
(interactive)
(find-file "~/Projects/"))
(keymap-global-set "C-c w d" #'my/open-documents-directory)
(keymap-global-set "C-c w C-d" #'my/open-downloads-directory)
(keymap-global-set "C-c w p" #'my/open-projects-directory)
#+end_src