summary refs log tree commit diff
path: root/config.org
diff options
context:
space:
mode:
authornoa@gaiwan.org2024-06-19 20:51:11 +0000
committernoa@gaiwan.org2024-06-19 20:51:11 +0000
commit75a9be77dc29a1cb90f5117390d6f31abb9540ee (patch)
treeafb5a6f962df4053da2d1919b4d96b19924754c0 /config.org
parent4007b9a925017c78cb5ea183a474970e653dc810 (diff)
Update configuration for spellcheck and autocorrect
Diffstat (limited to 'config.org')
-rw-r--r--config.org12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.org b/config.org
index 03dd79b..f9a8c47 100644
--- a/config.org
+++ b/config.org
@@ -334,6 +334,16 @@ Finally, have a binding to jump to a buffer in which there's been some new activ
 (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
 #+end_src
 
+* Better prose
+The majority of the work i do in emacs is writing documents, so it's nice to know that the words coming out of my fingers are the ones i expect them to be.
+
+** Autocorrection
+Abbrev mode expands one string into another string.  I use it as a simple autocorrect mode.  If i misspell a word, i run C-x a i g which will prompt me for what to expand the previous word into.  I type the correct spelling, and whenever i make that mistake again, it will automatically be corrected.  It's important to be careful not to set something that could be a typo for two words though, because otherwise it gets even more annoying.  Luckily it's easy to update the abbrevs which are stored in ~/.config/emacs/abbrev_defs.  M-x list-abbrevs is also a nice command which shows all the saved abbrevs and how many times they've been expanded.
+
+#+begin_src elisp
+(add-hook 'text-mode-hook #'abbrev-mode)
+#+end_src
+
 ** Spellcheck
 Jinx is a package for spellchecking.  Previously i used [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html][flyspell]], which is built in, and [[https://codeberg.org/ideasman42/emacs-spell-fu][spell-fu]].  Flyspell is not ideal because it only checks the word under the point.  Furthermore, the correction interface is not pleasant to look at with a proportional font as it uses spaces to align the candidates.  Spell-fu checks all the words that are visible, thereby behaving much more like a traditional spell checker.  Jinx improves on spell-fu by interacting with the spellcheck process in a more efficient way, and has a nicer interface to corrections.
 
@@ -381,6 +391,8 @@ Almost everywhere else, the ~highlight~ face is used for interactive text on mou
   (put 'jinx-overlay 'mouse-face '(jinx-misspelled highlight))
 #+end_src
 
+I mentioned that i thought this wasn't the best default behaviour [[https://github.com/minad/jinx/discussions/184][in the jinx repository]], but Daniel seems happy with it.  I appreciate that he's made it so easy to change the behaviour to something i prefer.
+
 ** Completing-read everywhere with consult
 Consult is a package to provide navigation commands that take advantage of completing-read.  I set up a nice completing-read environment earlier with vertico.  There are a lot of commands built in to consult, and it's possible to define more.  But i use it very simply.