From 3ab9689d54288f99d5de5a3c2a894d58d2d7a06a Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Sat, 13 Mar 2021 18:44:52 -0500 Subject: [PATCH] Cleanup editor --- modules/editor.org | 95 +++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/modules/editor.org b/modules/editor.org index 8953f67..7b67cdb 100644 --- a/modules/editor.org +++ b/modules/editor.org @@ -203,6 +203,53 @@ By default *Dired*[fn:11] will create a new buffer every time you press =RET= ov "l" 'dired-single-buffer)) #+end_src +* Version control + +#+ATTR_ORG: :width 420px +#+ATTR_HTML: :width 420px +#+ATTR_LATEX: :width 420px +[[../docs/images/2021-02-13-example-magit.gif]] + +Yet another hallmark feature of Emacs: *Magit*[fn:17] with the *darling* name, the developer stresses it's supposed to be *Magic* but with *Git*[fn:19]. It's a complete *Git*[fn:19] porcelain within Emacs. + +#+begin_src emacs-lisp +(use-package magit + :commands magit-status + :custom (magit-display-buffer-function + #'magit-display-buffer-same-window-except-diff-v1)) +#+end_src + +Place keybindings for *magit*[fn:17] behind =SPC g=. + ++ Clone with =c= ++ Status with =g= + +#+begin_src emacs-lisp +(dotfiles/leader + "g" '(:ignore t :which-key "Magit") + "gc" '(magit-clone :which-key "Clone") + "gg" '(magit-status :which-key "Status")) +#+end_src + +** GitHub integration + +Interact with *Git*[fn:19] forges from *Magit*[fn:17] and Emacs using *Forge*[fn:18], requiring only a *GitHub*[fn:20] token to get started. If you're not sure what *GitHub*[fn:20] is, it's to *Git*[fn:19] what *Porn* is to *PornHub*. No citations! + ++ Requires a valid ~$GITHUB_TOKEN~ + +#+begin_src emacs-lisp +(use-package forge + :after magit) +#+end_src + +** Deploying the global config + +*Git*[fn:19] reads its global config from ~$HOME/.gitconfig~, create a link to the custom configuration. + +#+begin_src emacs-lisp +(dotfiles/symlink "~/.emacs.d/config/git" + "~/.gitconfig") +#+end_src * Terminal emulation Performing terminal interaction within an editor is a must have, the choices are *Eshell*[fn:15] and *Vterm*[fn:21]. @@ -254,54 +301,6 @@ sudo apt install -y cmake \ libtool-bin #+end_src -* Version control - -#+ATTR_ORG: :width 420px -#+ATTR_HTML: :width 420px -#+ATTR_LATEX: :width 420px -[[../docs/images/2021-02-13-example-magit.gif]] - -Yet another hallmark feature of Emacs: *Magit*[fn:17] with the *darling* name, the developer stresses it's supposed to be *Magic* but with *Git*[fn:19]. It's a complete *Git*[fn:19] porcelain within Emacs. - -#+begin_src emacs-lisp -(use-package magit - :commands magit-status - :custom (magit-display-buffer-function - #'magit-display-buffer-same-window-except-diff-v1)) -#+end_src - -Place keybindings for *magit*[fn:17] behind =SPC g=. - -+ Clone with =c= -+ Status with =s= - -#+begin_src emacs-lisp -(dotfiles/leader - "g" '(:ignore t :which-key "Magit") - "gc" '(magit-clone :which-key "Clone") - "gs" '(magit-status :which-key "Status")) -#+end_src - -** GitHub integration - -Interact with *Git*[fn:19] forges from *Magit*[fn:17] and Emacs using *Forge*[fn:18], requiring only a *GitHub*[fn:20] token to get started. If you're not sure what *GitHub*[fn:20] is, it's to *Git*[fn:19] what *Porn* is to *PornHub*. No citations! - -+ Requires a valid ~$GITHUB_TOKEN~ - -#+begin_src emacs-lisp -(use-package forge - :after magit) -#+end_src - -** Deploying the global config - -*Git*[fn:19] reads its global config from ~$HOME/.gitconfig~, create a link to the custom configuration. - -#+begin_src emacs-lisp -(dotfiles/symlink "~/.emacs.d/config/git" - "~/.gitconfig") -#+end_src - * Resources [fn:1] https://vim.org