From f544bed6f3ec2d3d46ee139ac6871a516d7ec3a7 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Thu, 10 Jul 2025 12:39:39 +0100 Subject: Add spell checking settings and keybindings --- emacs-config.org | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'emacs-config.org') diff --git a/emacs-config.org b/emacs-config.org index d80ee24..6302cc0 100644 --- a/emacs-config.org +++ b/emacs-config.org @@ -242,6 +242,30 @@ Disable auto-bookmarking org-mode files. (setq-default org-bookmark-names-plist nil)) #+end_src +** Spell Checking +Set dictionary. +#+begin_src elisp + (setq-default ispell-dictionary "british") +#+end_src + +Enable spell checking. +#+begin_src elisp + (add-hook 'text-mode-hook #'flyspell-mode) + (add-hook 'prog-mode-hook #'flyspell-prog-mode) +#+end_src + +Set custom spell checking keybindings. +#+begin_src elisp + (setq-default flyspell-mode-map (make-sparse-keymap)) + (with-eval-after-load 'flyspell + (keymap-set flyspell-mode-map "C-x c c" #'flyspell-auto-correct-word) + (keymap-set flyspell-mode-map "C-x c u" #'flyspell-auto-correct-previous-word) + (keymap-set flyspell-mode-map "C-x c l" #'flyspell-check-previous-highlighted-word) + (keymap-set flyspell-mode-map "C-x c n" #'flyspell-goto-next-error) + (keymap-set flyspell-mode-map "C-x c b" #'flyspell-buffer) + (keymap-set flyspell-mode-map "C-x c d" #'ispell-change-dictionary)) +#+end_src + ** Dired #+begin_src elisp :noweb yes (with-eval-after-load 'dired -- cgit