jit-spell icon indicating copy to clipboard operation
jit-spell copied to clipboard

Alternatives for `flyspell-goto-next-error` and `flyspell-auto-correct-word`

Open meain opened this issue 2 years ago • 4 comments
trafficstars

Thanks for the package. My personal workflow of flyspell involves the following two functions:

  • flyspell-goto-next-error puts cursor on the next flyspell error
  • flyspell-auto-correct-word chooses the first option, iterating between them on follow up invocations

Just wondering if you have considered them.

meain avatar Mar 11 '23 16:03 meain

Did you try jit-spell-correct-word? I'm not in principle against adding a cycling command as in Flyspell, but I'm not convinced they are more usable.

astoff avatar Mar 12 '23 07:03 astoff

Did you try jit-spell-correct-word?

Yup. flyspell-auto-correct-word fixes it to what I need the very first time more than 95% of the time avoiding having to select from a list. I can probably hack together something that just chooses the first selection automatically and that would mostly cover my usecase for correcting a word.

meain avatar Mar 12 '23 07:03 meain

Okay, I fixed the sorting in jit-spell-correct-word, so now the top of the list is the right choice 95% of the time :-). You still need to do C-; RET instead of C-;, but there are advantages (you can accept the word, cycle with C-;, etc). Let me know what you think.

astoff avatar Mar 12 '23 10:03 astoff

That improves the situation quite a bit. It would be great to have something like flyspell-goto-next-error as well and ideally a goto-previous (flyspell does not have it currently). While I might rely on this to fix errors, I'll keep this in my toolkit to see if I have misspellings in my buffer (but with flyspell fixing the actual errors).

meain avatar Mar 12 '23 11:03 meain