Compare commits
No commits in common. "58fc99cf8c93a4443b96a8169b578363eb35e406" and "bec66b58a79e3d0e9c789fa32df72226f2979d65" have entirely different histories.
58fc99cf8c
...
bec66b58a7
@ -68,6 +68,7 @@ they are much more comfortable than Emacs’.
|
|||||||
evil-want-C-u-scroll t
|
evil-want-C-u-scroll t
|
||||||
evil-want-C-i-jump nil)
|
evil-want-C-i-jump nil)
|
||||||
(require 'evil-vars)
|
(require 'evil-vars)
|
||||||
|
(evil-set-undo-system 'undo-tree)
|
||||||
:config
|
:config
|
||||||
<<evil-undefine-keys>>
|
<<evil-undefine-keys>>
|
||||||
<<evil-bepo>>
|
<<evil-bepo>>
|
||||||
@ -155,6 +156,52 @@ additional code compared to most people due to the bépo layout.
|
|||||||
(evil-collection-init))
|
(evil-collection-init))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
~undo-tree~ is my preferred way of undoing and redoing stuff. The main
|
||||||
|
reason is it doesn’t create a linear undo/redo history, but rather a
|
||||||
|
complete tree you can navigate to see your complete editing history.
|
||||||
|
One of the two obvious things to do are to tell Emacs to save all its
|
||||||
|
undo history files in a dedicated directory, otherwise we’d risk
|
||||||
|
littering all of our directories. The second thing is to simply
|
||||||
|
globally enable its mode.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package undo-tree
|
||||||
|
:defer t
|
||||||
|
:straight (:build t)
|
||||||
|
:custom
|
||||||
|
(undo-tree-history-directory-alist
|
||||||
|
`(("." . ,(expand-file-name (file-name-as-directory "undo-tree-hist")
|
||||||
|
user-emacs-directory))))
|
||||||
|
:init
|
||||||
|
(global-undo-tree-mode)
|
||||||
|
:config
|
||||||
|
<<undo-tree-ignore-text-properties>>
|
||||||
|
<<undo-tree-compress-files>>
|
||||||
|
(setq undo-tree-visualizer-diff t
|
||||||
|
undo-tree-visualizer-timestamps t
|
||||||
|
undo-tree-auto-save-history t
|
||||||
|
undo-tree-enable-undo-in-region t
|
||||||
|
undo-limit (* 800 1024)
|
||||||
|
undo-strong-limit (* 12 1024 1024)
|
||||||
|
undo-outer-limit (* 128 1024 1024)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
An interesting behaviour from DoomEmacs is to compress the history
|
||||||
|
files with ~zstd~ when it is present on the system. Not only do we enjoy
|
||||||
|
much smaller files (according to DoomEmacs, we get something like 80%
|
||||||
|
file savings), Emacs can load them much faster than the regular files.
|
||||||
|
Sure, it uses more CPU time uncompressing these files, but it’s
|
||||||
|
insignificant, and it’s still faster than loading a heavier file.
|
||||||
|
#+name: undo-tree-compress-files
|
||||||
|
#+begin_src emacs-lisp :tangle no
|
||||||
|
(when (executable-find "zstd")
|
||||||
|
(defun my/undo-tree-append-zst-to-filename (filename)
|
||||||
|
"Append .zst to the FILENAME in order to compress it."
|
||||||
|
(concat filename ".zst"))
|
||||||
|
(advice-add 'undo-tree-make-history-save-file-name
|
||||||
|
:filter-return
|
||||||
|
#'my/undo-tree-append-zst-to-filename))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Hydra
|
** Hydra
|
||||||
[[https://github.com/abo-abo/hydra][Hydra]] is a simple menu creator for keybindings.
|
[[https://github.com/abo-abo/hydra][Hydra]] is a simple menu creator for keybindings.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -62,6 +62,7 @@ Undefining some stuff to make keybind prefixes work correctly.
|
|||||||
"'" '(shell-pop :package shell-pop)
|
"'" '(shell-pop :package shell-pop)
|
||||||
"R" #'recompile
|
"R" #'recompile
|
||||||
"u" #'universal-argument
|
"u" #'universal-argument
|
||||||
|
"U" '(undo-tree-visualize :package undo-tree)
|
||||||
|
|
||||||
<<general-keybindings-gen(table=keybindings-tabs, prefix="TAB ")>>
|
<<general-keybindings-gen(table=keybindings-tabs, prefix="TAB ")>>
|
||||||
<<general-keybindings-gen(table=keybindings-apps, prefix="a")>>
|
<<general-keybindings-gen(table=keybindings-apps, prefix="a")>>
|
||||||
|
@ -1604,10 +1604,9 @@ an interrupt signal.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package vterm
|
(use-package vterm
|
||||||
:defer t
|
:defer t
|
||||||
:straight (:build t)
|
:straight t
|
||||||
:config
|
:config
|
||||||
(setq vterm-shell "/usr/bin/fish"
|
(setq vterm-shell "/usr/bin/fish"))
|
||||||
vterm-always-compile-module t))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
One annoying think with vterm is it only can create one buffer, you
|
One annoying think with vterm is it only can create one buffer, you
|
||||||
|
@ -100,6 +100,16 @@ general {
|
|||||||
I may one day use the [[https://github.com/hyprland-community/pyprland][=layout_center=]] layout from [[https://github.com/hyprland-community/pyprland][pyprland]], but I
|
I may one day use the [[https://github.com/hyprland-community/pyprland][=layout_center=]] layout from [[https://github.com/hyprland-community/pyprland][pyprland]], but I
|
||||||
haven’t got around to do that yet.
|
haven’t got around to do that yet.
|
||||||
|
|
||||||
|
This section is specific to touchpads, but I like to use it to switch
|
||||||
|
between workspaces quickly. Note that I only want to swipe between
|
||||||
|
existing workspaces, not to create new ones.
|
||||||
|
#+begin_src conf
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = true
|
||||||
|
workspace_swipe_numbered = true
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Decorations are just a nice thing to make things look pretty. I like
|
Decorations are just a nice thing to make things look pretty. I like
|
||||||
some slight rounding on my windows with a nice though light shadow.
|
some slight rounding on my windows with a nice though light shadow.
|
||||||
Again, the colour comes from the Nord palette with nord0.
|
Again, the colour comes from the Nord palette with nord0.
|
||||||
@ -369,7 +379,7 @@ It is sort of the general menu for my keybindings.
|
|||||||
|-----------+-----+--------+-------------------+--------|
|
|-----------+-----+--------+-------------------+--------|
|
||||||
| | b | exec | =firefox= | reset |
|
| | b | exec | =firefox= | reset |
|
||||||
| SHIFT | b | exec | =qutebrowser= | reset |
|
| SHIFT | b | exec | =qutebrowser= | reset |
|
||||||
| | d | exec | =vesktop= | reset |
|
| | d | exec | =discord= | reset |
|
||||||
| | e | exec | =emacsclient -c -n= | reset |
|
| | e | exec | =emacsclient -c -n= | reset |
|
||||||
| | g | exec | =gimp= | reset |
|
| | g | exec | =gimp= | reset |
|
||||||
| | n | exec | =nemo= | reset |
|
| | n | exec | =nemo= | reset |
|
||||||
|
Loading…
Reference in New Issue
Block a user