From e269e493d2fbf52372100650162736df228ef6b6 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 16 Feb 2021 11:07:57 -0600 Subject: [PATCH] Adding magit and making things smoother --- README.org | 3 ++- init.el | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index d35a1168..803c339d 100644 --- a/README.org +++ b/README.org @@ -190,7 +190,7 @@ This evil-collection package includes a lot of other evil based things. *** SELECTRUM I prefer selectrum over Ivy or Helm for completions. It is using the basic completing read system and therefore it is more inline with basic emacs. Also, let's add prescient to be able to filter selectrum well. We'll add some keybindings too for easier navigation on the home row. -#+BEGIN_SRC elisp +#+BEGIN_SRC emacs-lisp (use-package selectrum :init (selectrum-mode +1) @@ -338,6 +338,7 @@ Need to setup auto tangle yes #+end_src ** Magit +Use magit, because why wouldn't you? duh! #+begin_src emacs-lisp (use-package magit :commands (magit-status magit-get-current-branch) diff --git a/init.el b/init.el index 7ba4b00e..9797ec78 100644 --- a/init.el +++ b/init.el @@ -80,12 +80,18 @@ :keymaps '(normal visual emacs) :prefix "SPC") (chris/leader-keys + "b" '(:ignore t :which-key "buffer") "t" '(:ignore t :which-key "toggle") "f" '(:ignore t :which-key "file") "w" '(:ignore t :which-key "window") + "s" '(:ignore t :which-key "search") + "o" '(:ignore t :which-key "open") + "bs" '(consult-buffer :which-key "buffer search") "tt" '(consult-theme :which-key "choose theme") "ff" '(find-file :which-key "find file") "fs" '(save-buffer :which-key "save") + "od" '(dired-jump :which-key "dired jump") + "ss" '(consult-line :which-key "consult search") "ww" '(other-window :which-key "other window") )) @@ -94,6 +100,18 @@ :init (evil-escape-mode +1) :config (setq evil-escape-key-sequence "fd")) +(use-package selectrum + :init + (selectrum-mode +1) + :config + (general-define-key + :keymaps 'selectrum-minibuffer-map + "C-j" 'selectrum-next-candidate + "C-k" 'selectrum-previous-candidate + "C-S-j" 'selectrum-goto-end + "C-S-k" 'selectrum-goto-beginning + "TAB" 'selectrum-insert-current-candidate)) + (use-package prescient :config (prescient-persist-mode +1)) @@ -136,3 +154,8 @@ (org-babel-tangle)))) (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config)))) + +(use-package magit + :commands (magit-status magit-get-current-branch) + :custom +(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))