mirror of
https://github.com/larstvei/dot-emacs.git
synced 2025-06-02 21:50:12 +00:00
Compare commits
2 Commits
72fbff0076
...
59fd42d8d3
Author | SHA1 | Date | |
---|---|---|---|
59fd42d8d3 | |||
b40c72b5ac |
20
init.org
20
init.org
@ -120,8 +120,8 @@
|
||||
|
||||
#+end_src
|
||||
|
||||
I want lexical scoping for the init-file, which can be specified in the
|
||||
header. The first line of the configuration is as follows:
|
||||
I want lexical scoping for the init and early-init files, which can be
|
||||
specified in the header. The first line of the configuration is as follows:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
@ -129,6 +129,12 @@
|
||||
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp :tangle early-init.el
|
||||
|
||||
;;; -*- lexical-binding: t -*-
|
||||
|
||||
#+end_src
|
||||
|
||||
The =init.el= should (after the first run) mirror the source blocks in the
|
||||
=init.org=. We can use =C-c C-v t= to run =org-babel-tangle=, which extracts
|
||||
the code blocks from the current file into a source-specific file (in this
|
||||
@ -633,25 +639,27 @@
|
||||
|
||||
* Version control
|
||||
|
||||
Magit is the best.
|
||||
[[https://magit.vc/][Magit]] is the best.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
;; A Git porcelain inside Emacs.
|
||||
(use-package magit
|
||||
:hook ((magit-pre-refresh . diff-hl-magit-pre-refresh)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh))
|
||||
:bind (:map custom-bindings-map ("C-c m" . magit-status)))
|
||||
|
||||
#+end_src
|
||||
|
||||
Have some visual indication where there are uncommitted changes.
|
||||
Have some visual indication where there are uncommitted changes using
|
||||
[[https://github.com/dgutov/diff-hl][~diff-hl~]]. In addition, ~diff-hl~ can be automatically updated when interacting
|
||||
with Magit.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
||||
;; Highlight uncommitted changes using VC
|
||||
(use-package diff-hl
|
||||
:defer t
|
||||
:hook ((magit-pre-refresh . diff-hl-magit-pre-refresh)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh))
|
||||
:config
|
||||
(global-diff-hl-mode 1))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user