-
Notifications
You must be signed in to change notification settings - Fork 126
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
meow-pop-selection
should undo meow-cancel-selection
#418
Comments
The selection histories are stored with their positions, once a modification is made, the histories become inaccurate. This is why we drop histories when selection is deactivated. |
OK, but what about when no modification has been made? One thing I find happening a lot as I try to adjust to meow is that I'll start selecting something, then accidentally start a new selection (when I wanted to extend the old one), but there is already no way to undo my mistake. I have to start my selection over again from scratch. |
It's possible, of course, but I don't think it's a good idea. Two reasons:
I used to have a concept in my mind to make all "single-key" mistake recoverable, by designing all commands in a compatible way. But in the end, I found it introduces a lot complexity. And in your case, a simple idea is, don't extend the selection. When making a selection, you should describe where you want to go(e.g. after a specific char, end of a symbol, a paired parentheses, etc), instead of describing the path(e.g. line+word+char*3). Whenever you need a arbitrary extending, you use built-in commands, |
Would you still be open to accepting this feature if someone could find and PR a simple way to do it? I also really feel the need for it. It's often not possible to specify a complex selection with Meow's thing commands (example - select the next 3 paragraphs), and it's very easy to lose a carefully made selction in Meow since so many commands cancel it. As an example of a possible approach, though I haven't tried yet, I think it could be done by using markers to save the selection positions in |
I was looking for an analog to vim's
gv
command that re-selects the most recent selection, and I couldn't find one. I rely on this feature in vim and I think it would be even more useful in meow given how much more meow relies on selections.Probably the most logical place to add this functionality in meow is as a fallback behavior when
meow-pop-selection
is called without a selection.The text was updated successfully, but these errors were encountered: