d12frosted / flyspell-correct

Distraction-free words correction with flyspell via selected interface.
Other
203 stars 14 forks source link

A simpler flyspell-correct-wrapper #82

Closed gusbrs closed 4 years ago

gusbrs commented 4 years ago

I've been using flyspell-correct-wrapper as my main spell-checking interface for some time, and though I like it very much, the way it uses up to three universal-arguments, with two different behavior dimensions at play (repetition and direction) does put some cognitive load into calling it. And I admit I end up usually refraining from calling it with arguments for this reason.

Since the inclusion of the ability to skip a word on demand, independently of having called flyspell-correct-wrapper with an argument (in https://github.com/d12frosted/flyspell-correct/issues/58#issuecomment-586598691), the rapid-mode became much less important to me. When I want do do a longer spell-checking session, I go to the hydra #69 instead.

So I came up with a simpler flyspell-correct-wrapper, which takes up only one argument, and changes the direction with the argument. I'm using it in the form:

(defun flyspell-correct-once-wrapper (&optional arg)
  "Correct spelling error once in a dwim fashion.
One \\[universal-argument] changes direction of spelling errors search."
  (interactive "P")
  (when (or (not (mark t))
        (/= (mark t) (point)))
    (push-mark (point) t))
  (flyspell-correct-move (point) arg))

which is, of course, just a simplified version of the current wrapper, and it does not enable rapid-mode.

A single binding, up to a single argument. And it solves 95% of my relevant cases, and for the other 5% I can fall-back to a more general command. The point, of course, is to reduce friction in the most common use case.

I'm still in the phase of "getting used to it", but I like it. And I thought it might also interest other users of flyspell-correct.

d12frosted commented 4 years ago

Hey @gusbrs

As always, thank you very much for your feedback!

the way it uses up to three universal-arguments, with two different behavior dimensions at play (repetition and direction) does put some cognitive load into calling it

Can't agree more! To be honest, the only times I use arguments - when I want to start rapid mode. Directions? I don't remember how it works.

hydra

I understand.

So I came up with a simpler flyspell-correct-wrapper, which takes up only one argument, and changes the direction with the argument. I'm using it in the form:

Thank you for sharing it :)

gusbrs commented 4 years ago

Can't agree more! To be honest, the only times I use arguments - when I want to start rapid mode. Directions? I don't remember how it works.

:-D

Well, thinking of it, this little function of mine is really just useful for those with the skip binding of #58 . I'm afraid I might be the only one. So I'll close this and leave this here "for the record" and for the reference of the more curious. ;-)