Update README.md

This commit is contained in:
James Cherti
2025-07-15 22:31:15 -04:00
parent 4923d1be74
commit 1e19e3b723

View File

@@ -75,14 +75,16 @@ In addition to *minimal-emacs.d*, startup speed is influenced by your computer's
- [Enhancing undo/redo](#enhancing-undoredo) - [Enhancing undo/redo](#enhancing-undoredo)
- [Configuring Vim keybindings using Evil?](#configuring-vim-keybindings-using-evil) - [Configuring Vim keybindings using Evil?](#configuring-vim-keybindings-using-evil)
- [Configuring LSP Servers with Eglot (built-in)](#configuring-lsp-servers-with-eglot-built-in) - [Configuring LSP Servers with Eglot (built-in)](#configuring-lsp-servers-with-eglot-built-in)
- [Session Management](#session-management) - [Persisting and Restoring all buffers, windows/split, tab-bar, frames...](#persisting-and-restoring-all-buffers-windowssplit-tab-bar-frames)
- [Configuring org-mode](#configuring-org-mode) - [Configuring org-mode](#configuring-org-mode)
- [Configuring markdown-mode (e.g., README.md syntax)](#configuring-markdown-mode-eg-readmemd-syntax) - [Configuring markdown-mode (e.g., README.md syntax)](#configuring-markdown-mode-eg-readmemd-syntax)
- [Tree-sitter Integration (Better Syntax Highlighting)](#tree-sitter-integration-better-syntax-highlighting) - [Tree-sitter Integration (Better Syntax Highlighting)](#tree-sitter-integration-better-syntax-highlighting)
- [Auto upgrade Emacs packages](#auto-upgrade-emacs-packages) - [Auto upgrade Emacs packages](#auto-upgrade-emacs-packages)
- [Safely terminating unused buffers](#safely-terminating-unused-buffers)
- [Treemacs, a tree layout file explorer (Sidebar file explorer)](#treemacs-a-tree-layout-file-explorer-sidebar-file-explorer) - [Treemacs, a tree layout file explorer (Sidebar file explorer)](#treemacs-a-tree-layout-file-explorer-sidebar-file-explorer)
- [Inhibit the mouse](#inhibit-the-mouse) - [Inhibit the mouse](#inhibit-the-mouse)
- [Spell checker](#spell-checker) - [Spell checker](#spell-checker)
- [Efficient jumps for enhanced productivity](#efficient-jumps-for-enhanced-productivity)
- [Asynchronous code formatting without cursor disruption](#asynchronous-code-formatting-without-cursor-disruption) - [Asynchronous code formatting without cursor disruption](#asynchronous-code-formatting-without-cursor-disruption)
- [A better Emacs *help* buffer](#a-better-emacs-help-buffer) - [A better Emacs *help* buffer](#a-better-emacs-help-buffer)
- [Enhancing the Elisp development experience](#enhancing-the-elisp-development-experience) - [Enhancing the Elisp development experience](#enhancing-the-elisp-development-experience)
@@ -853,7 +855,7 @@ Here is an example of how to configure Eglot to enable or disable certain option
:rope_autoimport (:enabled :json-false))))) :rope_autoimport (:enabled :json-false)))))
``` ```
### Session Management ### Persisting and Restoring all buffers, windows/split, tab-bar, frames...
The [easysession](https://github.com/jamescherti/easysession.el) Emacs package is a session manager for Emacs that can persist and restore file editing buffers, indirect buffers/clones, Dired buffers, windows/splits, the built-in tab-bar (including tabs, their buffers, and windows), and Emacs frames. It offers a convenient and effortless way to manage Emacs editing sessions and utilizes built-in Emacs functions to persist and restore frames. The [easysession](https://github.com/jamescherti/easysession.el) Emacs package is a session manager for Emacs that can persist and restore file editing buffers, indirect buffers/clones, Dired buffers, windows/splits, the built-in tab-bar (including tabs, their buffers, and windows), and Emacs frames. It offers a convenient and effortless way to manage Emacs editing sessions and utilizes built-in Emacs functions to persist and restore frames.
@@ -1034,6 +1036,35 @@ To configure **auto-package-update**, add the following to `~/.emacs.d/post-init
(auto-package-update-at-time "10:00")) (auto-package-update-at-time "10:00"))
``` ```
### Safely terminating unused buffers
The [buffer-terminator](https://github.com/jamescherti/buffer-terminator.el) Emacs package *automatically and safely kills buffers*, ensuring a clean and efficient workspace while *enhancing the performance of Emacs* by reducing open buffers, which minimizes active modes, timers, processes...
Beyond performance, *buffer-terminator* provides other benefits. For instance, if you occasionally need to close annoying or unused buffers, *buffer-terminator* can handle this automatically, eliminating the need for manual intervention. (The default configuration is suitable for most users. However, the *buffer-terminator* package is highly customizable. You can define specific rules for retaining or terminating buffers by modifying the `buffer-terminator-rules-alist` with your preferred set of rules.)
To configure **buffer-terminator**, add the following to `~/.emacs.d/post-init.el`:
```emacs-lisp
(use-package buffer-terminator
:ensure t
:custom
;; Enable/Disable verbose mode to log buffer cleanup events
(buffer-terminator-verbose nil)
;; Set the inactivity timeout (in seconds) after which buffers are considered
;; inactive (default is 30 minutes):
(buffer-terminator-inactivity-timeout (* 30 60)) ; 30 minutes
;; Define how frequently the cleanup process should run (default is every 10
;; minutes):
(buffer-terminator-interval (* 10 60)) ; 10 minutes
:config
(buffer-terminator-mode 1))
```
(By default, *buffer-terminator* automatically determines which buffers are safe to terminate. However, if you need to define specific rules for keeping or terminating certain buffers, you can configure them using `buffer-terminator-rules-alist`.)
### Treemacs, a tree layout file explorer (Sidebar file explorer) ### Treemacs, a tree layout file explorer (Sidebar file explorer)
The [treemacs](https://github.com/Alexander-Miller/treemacs) package is a file and project explorer for Emacs that provides a visually structured tree layout similar to file browsers in modern IDEs. It integrates well with various Emacs packages such as `projectile`, `lsp-mode`, and `magit`, allowing users to navigate their project structure efficiently. The [treemacs](https://github.com/Alexander-Miller/treemacs) package is a file and project explorer for Emacs that provides a visually structured tree layout similar to file browsers in modern IDEs. It integrates well with various Emacs packages such as `projectile`, `lsp-mode`, and `magit`, allowing users to navigate their project structure efficiently.
@@ -1229,6 +1260,25 @@ To configure **flyspell**, add the following to `~/.emacs.d/post-init.el`:
flyspell-prog-text-faces))) flyspell-prog-text-faces)))
``` ```
### Efficient jumps for enhanced productivity
The [avy](https://github.com/abo-abo/avy) package is a navigation framework designed for jumping directly to any visible text on the screen with minimal keystrokes. The primary benefit of *avy* is a substantial increase in navigational efficiency, as it minimizes keystrokes compared to iterative methods like arrow keys or standard search.
It operates by generating a dynamic, temporary mapping: upon invocation, such as with the command `avy-goto-char` or `avy-goto-char-2`, the user inputs a target character, and `avy` highlights all visible instances on the screen with unique key sequences. Typing the short sequence corresponding to the desired location instantly moves the point directly there.
To configure **avy**, add the following to `~/.emacs.d/post-init.el`:
```elisp
(use-package avy
:ensure t
:commands (avy-goto-char
avy-goto-char-2
avy-next)
:init
(global-set-key (kbd "C-'") 'avy-goto-char-2))
```
The author recommends using `avy-goto-char-2` (typically bound to `C-'`). Upon invocation, *avy* prompts the user to input a two-character sequence. Subsequently, all visible instances of this sequence are highlighted with unique, concise labels (e.g., single letters or numbers). The user then simply presses the key corresponding to the desired label, and *avy* instantly transports the cursor to that specific occurrence.
### Asynchronous code formatting without cursor disruption ### Asynchronous code formatting without cursor disruption
[Apheleia](https://github.com/radian-software/apheleia) is an Emacs package designed to run code formatters asynchronously without disrupting the cursor position. Code formatters like Shfmt, Black and Prettier ensure consistency and improve collaboration by automating formatting, but running them on save can introduce latency (e.g., Black takes around 200ms on an empty file) and unpredictably move the cursor when modifying nearby text. [Apheleia](https://github.com/radian-software/apheleia) is an Emacs package designed to run code formatters asynchronously without disrupting the cursor position. Code formatters like Shfmt, Black and Prettier ensure consistency and improve collaboration by automating formatting, but running them on save can introduce latency (e.g., Black takes around 200ms on an empty file) and unpredictably move the cursor when modifying nearby text.