Browse Source

Cleanup editor

main
parent
commit
3ab9689d54
  1. 95
      modules/editor.org

95
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)) "l" 'dired-single-buffer))
#+end_src #+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 * Terminal emulation
Performing terminal interaction within an editor is a must have, the choices are *Eshell*[fn:15] and *Vterm*[fn:21]. 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 libtool-bin
#+end_src #+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 * Resources
[fn:1] https://vim.org [fn:1] https://vim.org

Loading…
Cancel
Save