-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to configure default direction of flyspell-correct-wrapper
#81
Comments
As far as my personal taste goes, and the use I make of But I do see potential uses for this kind of control at another level. I'll provide two examples. The hydra suggested at #69 does some sort of "current direction management" with A second example. I have my bindings for (:map flyspell-mode-map
("C-;" . flyspell-correct-wrapper)
("C-." . flyspell-correct-next)
("C-," . flyspell-correct-previous))
(:map flyspell-correct-ivy-map
("C-;" . flyspell-correct-ivy-skip)
("C-." . flyspell-correct-ivy-skip)
("C-," . flyspell-correct-ivy-skip)) With I mostly use In other words, I wouldn't really care about having such options at the "UI level", but having some such handles at an "API level" might prove interesting. Note: "might", and I'm not sure if it's worth the added complexity. The examples are not stellar either: the first ostensibly does not use Edit: Thinking again about this, I've come to the conclusion the comment was short-sighted. Everything I said might be useful is already available as API at |
I offer the opinion that this would be confusing. At least, the behavior should be configurable. If I understand, automatically changing the variable would make the default value less meaningful. In addition, although it can be useful, it is hard to say that a person wants to change directions for the next run just because they wanted to change directions for the current run. Maybe a separate command to toggle the default direction in the buffer would suffice? An indicator in the modeline would help with cognitive load, but I don't think that is a counter against what I said above. |
@gusbrs totally agree! I also don't like this idea. I love your second example. Simplified hydra. Though please note, that
Don't worry, I love to get more and more usecases.
Cool. Thanks. The more I think about the less I like the idea of having configuration variable. We have two functions:
So... it's already here :) use whatever function you like - bind your default. Variable of direction for wrapper makes sense only if one of the following holds true:
So in my understanding if we
We don't need any configurations at all. I think both of this things can be even done via actions. So
WDYT? |
I like it. Very much. +1 I've just one small thing to add. In this setting, with a heavier reliance on actions for basic aspects of the UI, it would be nice if the actions could be called by commands, and bound to keys, in a more institutionalized way than setting the value of an internal variable, as is done in #58 (comment). |
Totally agree. This should be also done. |
Just had a though that action for changing direction is not the same as |
And also, I am not sure about how this action (for changing direction) should work. I think it should act like For example, I have mistakes before and after the point. I am calling Now, if I run
And even during correction session you could quickly switch directions. Which is nice. Now, if you have only misspelled words after the point - So it seems that I have covered all use cases and really this action could act as |
In the general case, true. But not necessarily we have to bind two outer-level bindings for
I think these changes will make
That is precisely what I'd love to do. ;-) I'm glad sharing that little example was not that useless after all.
I agree here. I also think it would be more useful to "toggle direction and go to 'next/previous'" rather than just "toggle direction and stay put". |
It would be nice to have a configuration variable for the default direction of
flyspell-correct-wrapper
.Optionally (I am not sure if it's a good idea, any input would be helpful), value of this variable should be modified when changing direction using universal arguments. For example, if the value of that variable is set to forward, invocation of
flyspell-correct-wrapper
withC-u C-u
starts backward spell correction and the value of direction is also changed, so the next execution offlyspell-correct-wrapper
without any universal arguments will lead to backward spell correction. What I personally dislike about this feature, it creates cognitive load, as you don't know current value of direction unless you callflyspell-correct-wrapper
or inspect the value of variable. For complex cases where you constantly need to switch direction, it's better to use hydra (see #69). But I would love to hear more from users.See the second point in #48 for more information.
The text was updated successfully, but these errors were encountered: