diff --git a/init.d/text/common.el b/init.d/text/common.el index 34bc976..2b4be73 100644 --- a/init.d/text/common.el +++ b/init.d/text/common.el @@ -1,6 +1,6 @@ ;;; common.el --- Common settings for text files. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-08-24T01:19:01+0200> +;; Time-stamp: <2020-10-14T21:39:33+0200> ;;; Commentary: @@ -284,8 +284,28 @@ (text-mode . my/ws-load-local-vars-first) (before-save . my/ws-maybe-cleanup))) +;; ripgrep. (use-package rg :bind ("C-c s" . rg-menu)) +;; Insert pseudo latin text. +(use-package lorem-ipsum) + +;; Translate ANSI escape color codes. +(use-package ansi-color + :config (progn + (defun my/apply-ansi-colors-on-buffer () + "Apply ANSI colors in the current buffer." + (interactive) + (let ((inhibit-read-only t)) + (ansi-color-apply-on-region (point-min) (point-max)))) + + (defun my/apply-ansi-colors-compilation () + "Apply ANSI colors in the compilation window." + (let ((inhibit-read-only t)) + (ansi-color-apply-on-region compilation-filter-start (point))))) + :mode ("\\.log$" . my/apply-ansi-colors-on-buffer) + :hook (compilation-filter . my/apply-ansi-colors-compilation)) + (provide 'text/common) ;;; common.el ends here diff --git a/init.d/text/misc.el b/init.d/text/misc.el index a0661c7..ee85f88 100644 --- a/init.d/text/misc.el +++ b/init.d/text/misc.el @@ -1,6 +1,6 @@ ;;; misc.el --- Miscellaneous file formats. -*- lexical-binding: t; -*- -;; Time-stamp: <2020-10-14T21:06:39+0200> +;; Time-stamp: <2020-10-14T21:38:52+0200> ;;; Commentary: @@ -100,9 +100,6 @@ ("\\.markdown$" . gfm-mode)) :hook (markdown-mode . auto-fill-mode)) ; Wrap at fill-column. -;; Insert pseudo latin text. -(use-package lorem-ipsum) - ;; Document editing, formatting, and organizing mode. (use-package org :straight nil ; Use built-in version. @@ -191,21 +188,6 @@ :repo "https://anongit.gentoo.org/git/proj/ebuild-mode.git"))) :hook (ebuild-mode . (lambda () (set-fill-column 80)))) -;; Translate ANSI escape color codes. -(use-package ansi-color - :config (progn - (defun my/apply-ansi-colors-on-buffer () - "Apply ANSI colors in the current buffer." - (interactive) - (let ((inhibit-read-only t)) - (ansi-color-apply-on-region (point-min) (point-max)))) - (defun my/apply-ansi-colors-compilation () - "Apply ANSI colors in the compilation window." - (let ((inhibit-read-only t)) - (ansi-color-apply-on-region compilation-filter-start (point))))) - :mode ("\\.log$" . my/apply-ansi-colors-on-buffer) - :hook (compilation-filter . my/apply-ansi-colors-compilation)) - ;; Syntax-highlighting mode for text/gemini. (use-package gemini-mode :hook (gemini-mode . (lambda() (auto-fill-mode -1))))