Various improvements
This commit is contained in:
@@ -208,6 +208,11 @@ Add the following to `~/.emacs.d/pre-early-init.el` to ensure that `minimal-emac
|
|||||||
(setq minimal-emacs-gc-cons-threshold (* 64 1024 1024))
|
(setq minimal-emacs-gc-cons-threshold (* 64 1024 1024))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How to change the outline-mode or outline-minor-mode Ellipsis (...) to (▼)?
|
||||||
|
|
||||||
|
|
||||||
|
If you want to to change the outline-mode or outline-minor-mode Ellipsis (...) to (▼), use the code snippet in this article: [Changing the Ellipsis (“…”) in outline-mode and outline-minor-mode](https://www.jamescherti.com/emacs-customize-ellipsis-outline-minor-mode/).
|
||||||
|
|
||||||
### How to run the minimal-emacs.d Emacs configuration from another directory?
|
### How to run the minimal-emacs.d Emacs configuration from another directory?
|
||||||
|
|
||||||
To run minimal-emacs.d from a different directory, you can specify the path to your configuration directory using the --init-directory option. For example, to run Emacs with the configuration located in ~/.config/minimal-emacs.d/, use the following command:
|
To run minimal-emacs.d from a different directory, you can specify the path to your configuration directory using the --init-directory option. For example, to run Emacs with the configuration located in ~/.config/minimal-emacs.d/, use the following command:
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
(defvar minimal-emacs--default-user-emacs-directory user-emacs-directory
|
(defvar minimal-emacs--default-user-emacs-directory user-emacs-directory
|
||||||
"The default value of the `user-emacs-directory' variable.")
|
"The default value of the `user-emacs-directory' variable.")
|
||||||
|
|
||||||
|
(setq custom-theme-directory (expand-file-name "themes/" user-emacs-directory))
|
||||||
|
(setq custom-file
|
||||||
|
(expand-file-name "custom.el"
|
||||||
|
minimal-emacs--default-user-emacs-directory))
|
||||||
|
|
||||||
(defun minimal-emacs-load-user-init (filename)
|
(defun minimal-emacs-load-user-init (filename)
|
||||||
"Execute a file of Lisp code named FILENAME."
|
"Execute a file of Lisp code named FILENAME."
|
||||||
(let ((user-init-file
|
(let ((user-init-file
|
||||||
@@ -39,8 +44,6 @@
|
|||||||
|
|
||||||
(set-language-environment "UTF-8")
|
(set-language-environment "UTF-8")
|
||||||
|
|
||||||
(setq custom-theme-directory (expand-file-name "themes/" user-emacs-directory))
|
|
||||||
|
|
||||||
;; Set-language-environment sets default-input-method, which is unwanted.
|
;; Set-language-environment sets default-input-method, which is unwanted.
|
||||||
(setq default-input-method nil)
|
(setq default-input-method nil)
|
||||||
|
|
||||||
@@ -230,6 +233,12 @@
|
|||||||
(when (fboundp 'horizontal-scroll-bar-mode)
|
(when (fboundp 'horizontal-scroll-bar-mode)
|
||||||
(horizontal-scroll-bar-mode -1))
|
(horizontal-scroll-bar-mode -1))
|
||||||
|
|
||||||
|
;; Allow for shorter responses: "y" for yes and "n" for no.
|
||||||
|
(if (boundp 'use-short-answers)
|
||||||
|
(setq use-short-answers t)
|
||||||
|
(advice-add #'yes-or-no-p :override #'y-or-n-p))
|
||||||
|
(defalias #'view-hello-file #'ignore) ; Never show the hello file
|
||||||
|
|
||||||
;;; package.el
|
;;; package.el
|
||||||
;; Since Emacs 27, package initialization occurs before `user-init-file' is
|
;; Since Emacs 27, package initialization occurs before `user-init-file' is
|
||||||
;; loaded, but after `early-init-file'.
|
;; loaded, but after `early-init-file'.
|
||||||
@@ -240,6 +249,9 @@
|
|||||||
;; Always ensure packages are installed
|
;; Always ensure packages are installed
|
||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
|
|
||||||
|
(setq frame-title-format '("%b – Emacs")
|
||||||
|
icon-title-format frame-title-format)
|
||||||
|
|
||||||
;;; Load post-early-init.el
|
;;; Load post-early-init.el
|
||||||
(minimal-emacs-load-user-init "post-early-init.el")
|
(minimal-emacs-load-user-init "post-early-init.el")
|
||||||
|
|
||||||
|
|||||||
42
init.el
42
init.el
@@ -53,24 +53,21 @@
|
|||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'use-package))
|
(require 'use-package))
|
||||||
|
|
||||||
;;; Misc
|
;;; Minibuffer
|
||||||
|
|
||||||
;; Allow nested minibuffers
|
;; Allow nested minibuffers
|
||||||
(setq enable-recursive-minibuffers t)
|
(setq enable-recursive-minibuffers t)
|
||||||
|
|
||||||
(setq custom-file
|
|
||||||
(expand-file-name "custom.el"
|
|
||||||
minimal-emacs--default-user-emacs-directory))
|
|
||||||
|
|
||||||
;; switch-to-buffer runs pop-to-buffer-same-window instead
|
|
||||||
(setq switch-to-buffer-obey-display-actions t)
|
|
||||||
|
|
||||||
;; Keep the cursor out of the read-only portions of the.minibuffer
|
;; Keep the cursor out of the read-only portions of the.minibuffer
|
||||||
(setq minibuffer-prompt-properties
|
(setq minibuffer-prompt-properties
|
||||||
'(read-only t intangible t cursor-intangible t face
|
'(read-only t intangible t cursor-intangible t face
|
||||||
minibuffer-prompt))
|
minibuffer-prompt))
|
||||||
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
|
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
|
||||||
|
|
||||||
|
;;; Misc
|
||||||
|
|
||||||
|
;; switch-to-buffer runs pop-to-buffer-same-window instead
|
||||||
|
(setq switch-to-buffer-obey-display-actions t)
|
||||||
|
|
||||||
(setq show-paren-delay 0.1
|
(setq show-paren-delay 0.1
|
||||||
show-paren-highlight-openparen t
|
show-paren-highlight-openparen t
|
||||||
show-paren-when-point-inside-paren t
|
show-paren-when-point-inside-paren t
|
||||||
@@ -95,6 +92,7 @@
|
|||||||
compilation-ask-about-save nil
|
compilation-ask-about-save nil
|
||||||
compilation-scroll-output 'first-error)
|
compilation-scroll-output 'first-error)
|
||||||
|
|
||||||
|
(setq truncate-string-ellipsis "…")
|
||||||
;;; Files
|
;;; Files
|
||||||
|
|
||||||
;; Disable the warning "X and Y are the same file". Ignoring this warning is
|
;; Disable the warning "X and Y are the same file". Ignoring this warning is
|
||||||
@@ -199,19 +197,7 @@
|
|||||||
(when minimal-emacs-savehist-enabled
|
(when minimal-emacs-savehist-enabled
|
||||||
(add-hook 'after-init-hook #'savehist-mode))
|
(add-hook 'after-init-hook #'savehist-mode))
|
||||||
|
|
||||||
;;; Subr
|
|
||||||
;; Allow for shorter responses: "y" for yes and "n" for no.
|
|
||||||
(if (boundp 'use-short-answers)
|
|
||||||
(setq use-short-answers t)
|
|
||||||
(advice-add #'yes-or-no-p :override #'y-or-n-p))
|
|
||||||
(defalias #'view-hello-file #'ignore) ; Never show the hello file
|
|
||||||
|
|
||||||
;;; Mule-util
|
|
||||||
(setq truncate-string-ellipsis "…")
|
|
||||||
|
|
||||||
;;; Frames and windows
|
;;; Frames and windows
|
||||||
(setq frame-title-format '("%b – Emacs")
|
|
||||||
icon-title-format frame-title-format)
|
|
||||||
|
|
||||||
;; Resizing the Emacs frame can be costly when changing the font. Disable this
|
;; Resizing the Emacs frame can be costly when changing the font. Disable this
|
||||||
;; to improve startup times with fonts larger than the system default.
|
;; to improve startup times with fonts larger than the system default.
|
||||||
@@ -223,14 +209,6 @@
|
|||||||
|
|
||||||
(setq resize-mini-windows 'grow-only)
|
(setq resize-mini-windows 'grow-only)
|
||||||
|
|
||||||
;;; Buffer
|
|
||||||
(setq-default left-fringe-width 8)
|
|
||||||
(setq-default right-fringe-width 8)
|
|
||||||
|
|
||||||
;; Do not show an arrow at the top/bottomin the fringe and empty lines
|
|
||||||
(setq-default indicate-buffer-boundaries nil)
|
|
||||||
(setq-default indicate-empty-lines nil)
|
|
||||||
|
|
||||||
;;; Smooth scrolling
|
;;; Smooth scrolling
|
||||||
;; Enables faster scrolling through unfontified regions. This may result in
|
;; Enables faster scrolling through unfontified regions. This may result in
|
||||||
;; brief periods of inaccurate syntax highlighting immediately after scrolling,
|
;; brief periods of inaccurate syntax highlighting immediately after scrolling,
|
||||||
@@ -278,6 +256,12 @@
|
|||||||
(setq ring-bell-function #'ignore)
|
(setq ring-bell-function #'ignore)
|
||||||
|
|
||||||
;;; Indent and formatting
|
;;; Indent and formatting
|
||||||
|
(setq-default left-fringe-width 8)
|
||||||
|
(setq-default right-fringe-width 8)
|
||||||
|
|
||||||
|
;; Do not show an arrow at the top/bottomin the fringe and empty lines
|
||||||
|
(setq-default indicate-buffer-boundaries nil)
|
||||||
|
(setq-default indicate-empty-lines nil)
|
||||||
|
|
||||||
;; Continue wrapped lines at whitespace rather than breaking in the
|
;; Continue wrapped lines at whitespace rather than breaking in the
|
||||||
;; middle of a word.
|
;; middle of a word.
|
||||||
|
|||||||
Reference in New Issue
Block a user