diff options
author | mattkae <mattkae@protonmail.com> | 2023-07-09 21:00:22 -0400 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2023-07-09 21:00:22 -0400 |
commit | 38097b158874ff0764d2313b5fd0635945542dee (patch) | |
tree | 9ffbd682bae8fa2e9eb4244716f1e41a28cb8b70 /lisp | |
parent | 2b0d13155d4ade5e777b594f1e36697b36e17309 (diff) |
Perfet margin mode
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/general.el | 6 | ||||
-rw-r--r-- | lisp/text.el | 13 |
2 files changed, 6 insertions, 13 deletions
diff --git a/lisp/general.el b/lisp/general.el index 6a7a3a7..d7e74d4 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -82,6 +82,12 @@ ;; Line numbers (global-display-line-numbers-mode 1) +;; Margin +(use-package perfect-margin + :ensure t + :config + (perfect-margin-mode t)) + ;; Show number of matches (setq isearch-lazy-highlight t) (setq isearch-lazy-count t) diff --git a/lisp/text.el b/lisp/text.el index 6a9858c..8a0274c 100644 --- a/lisp/text.el +++ b/lisp/text.el @@ -2,22 +2,10 @@ ;;; Code: (defun setup-text-mode () "Disable word wrap in text mode." - ;(perfect-margin-mode 1) (setq word-wrap t) (display-line-numbers-mode -1) ) -(defun my-perfect-margin-mode-hook() - (when (and (stringp buffer-file-name) - (string-match "\\.txt\\'" buffer-file-name)) - (perfect-margin-mode 1)) - ) - -(use-package perfect-margin - :ensure t - :config - (add-hook 'text-mode-hook 'my-perfect-margin-mode-hook)) - (add-hook 'text-mode-hook 'setup-text-mode) (use-package ispell :ensure t @@ -26,7 +14,6 @@ ispell-dictionary "en_US") ) - (use-package flyspell :ensure t :hook (text-mode . flyspell-mode) |