summaryrefslogtreecommitdiff
path: root/emacs-config.org
diff options
context:
space:
mode:
authorBlake Romero <blake@blkrom.com>2025-07-10 12:39:39 +0100
committerBlake Romero <blake@blkrom.com>2025-07-10 12:45:10 +0100
commitf544bed6f3ec2d3d46ee139ac6871a516d7ec3a7 (patch)
tree8496638a021e3c087877fd6e9941a0876324f899 /emacs-config.org
parent769f6f1fb50c272880912c8535e478c89410f024 (diff)
Add spell checking settings and keybindings
Diffstat (limited to 'emacs-config.org')
-rw-r--r--emacs-config.org24
1 files changed, 24 insertions, 0 deletions
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