From 3b3dbbb62818f8161aea6db18715222710c775b0 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Mon, 11 Nov 2024 13:30:16 +0100 Subject: [PATCH] add C-c equivalent to leader key --- init.org | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/init.org b/init.org index f0157fd..98a6174 100644 --- a/init.org +++ b/init.org @@ -412,17 +412,22 @@ muscle memory. ;; make vc commands available via leader key (evil-define-key 'normal 'global (kbd "v") vc-prefix-map) + (keymap-global-set "C-c v") #+END_SRC -#+RESULTS: +#+RESULTS #+BEGIN_SRC emacs-lisp ;; make project commands available via leader key (evil-define-key 'normal 'global (kbd "p") project-prefix-map) + (keymap-global-set "C-c p" project-prefix-map) #+END_SRC #+RESULTS: +: (keymap (2 . project-list-buffers) (111 . project-any-command) (120 . project-execute-extended-command) (114 . project-query-replace-regexp) (71 . project-or-external-find-regexp) (103 . project-find-regexp) (112 . project-switch-project) (107 . project-kill-buffers) (101 . project-eshell) (99 . project-compile) (118 . magit-status) (68 . project-dired) (100 . project-find-dir) (115 . project-shell) (98 . project-switch-to-buffer) (70 . project-or-external-find-file) (102 . project-find-file) (38 . project-async-shell-command) (33 . project-shell-command)) + +#+RESULTS #+BEGIN_SRC emacs-lisp (evil-define-key 'normal 'global @@ -430,6 +435,10 @@ muscle memory. (kbd "fo") #'recentf (kbd "fr") #'revert-buffer (kbd "fd") #'diff-buffer-with-file) + (keymap-global-set "C-c ff") #'find-file + (keymap-global-set "C-c fo") #'recentf + (keymap-global-set "C-c fr") #'revert-buffer + (keymap-global-set "C-c fd") #'diff-buffer-with-file) #+END_SRC #+BEGIN_SRC emacs-lisp @@ -438,20 +447,21 @@ muscle memory. #+END_SRC #+BEGIN_SRC emacs-lisp - (use-package harpoon - :ensure t - :init - (setq pti-harpoon-map (make-sparse-keymap)) - (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) - (keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file) - (keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file) - (keymap-set pti-harpoon-map (kbd "j") 'harpoon-go-to-1) - (keymap-set pti-harpoon-map (kbd "k") 'harpoon-go-to-2) - (keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3) - (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) - (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) - :bind - (("h" . 'pti-harpoon-map))) + (use-package harpoon + :ensure t + :init + (setq pti-harpoon-map (make-sparse-keymap)) + (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) + (keymap-set pti-harpoon-map (kbd "a") 'harpoon-add-file) + (keymap-set pti-harpoon-map (kbd "f") 'harpoon-toggle-file) + (keymap-set pti-harpoon-map (kbd "j") 'harpoon-go-to-1) + (keymap-set pti-harpoon-map (kbd "k") 'harpoon-go-to-2) + (keymap-set pti-harpoon-map (kbd "l") 'harpoon-go-to-3) + (keymap-set pti-harpoon-map (kbd ";") 'harpoon-go-to-4) + (keymap-set pti-harpoon-map (kbd "h") 'harpoon-toggle-quick-menu) + :bind + (("h" . 'pti-harpoon-map))) + #+END_SRC #+RESULTS: