meow-edit / meow

Yet another modal editing on Emacs / 猫态编辑
GNU General Public License v3.0
1.09k stars 127 forks source link

Examples how to do common things #82

Closed krdzo closed 2 years ago

krdzo commented 2 years ago

Hi. I like this package very much. I like that it's close to emacs and doesn't clutter keyboard with bindings and lets me to configure only the command that I want, but I have problems to get how to do some things that are more complex. Like I saw you added this multiedit section to the EXPLANATION.org file but I am unable to understand how you do those thing that you explained there. For instance you could write a concrete example how to do this transformation with meow:

foo-1-bar
foo-2-bar
foo-3-bar
=>
bar-1-foo
bar-2-foo
bar-3-foo

or any other from that set of counter examples. And maybe compare it to some concrete builtin emacs commands (although you probably don't need this part). At the end of Multiedit explanation you say that Meow answer is BMACRO but you don't show how to do something with it. I read BMACRO tutorial in the TUTORIAL.org file but I don't understand what it trying to say.

In the gif that you posted on reddit you show many things that I would like to do but I can't figure out how to do them. I believe that if this package had a little bit better documentation and a little bit more concrete examples on how to do things this package would be much more accessible to beginners, like me, and be much more adopted. I would like to offer my help to write them but like I said I don't know how to do those thing let alone write a tutorial on them.

skmd0 commented 2 years ago

I am also having hard time understanding how to use this package to the maximum potential. I read through all the documentation available, but still don't really understand a lot of things.

DogLooksGood commented 2 years ago

I realize the document for BMACRO is not enough, just have no idea how to improve yet. It will be awesome if you can help with the document!

I just update the multiedit section, check this: https://github.com/meow-edit/meow/blob/master/EXPLAINATION.org#the-answer-from-meow

Inc0n commented 2 years ago

I feel that if this package could provide a comparative summary to evil/vim key bindings, it could be very helpful to get people started (arguably vim model editing is easier to learn than emacs, but this is coming from an evil person ;)

But here are some of the key points that I think the tutorial should also address.

I hope theses points can provide a good direction for the maintainers and creators to forward the efforts into constructing better beginner (focused) documentations or tutorials

krdzo commented 2 years ago

Yes this is better. Now I have a beginning point from which I can start learning about this package specific features and how to do common things with it. As I learn I'll try to come up with better explanations for its features and will post here with ideas for better documentation.

Also think it would be good to write the key with the name of the command that is bound to it like this: G (meow-grab) (like in the Emacs manual) so that people have an easy way to find out which command you invoking with a key press. Either that or you could indicate at the beginning of this section which meow-setup you using with a link to meow-setup for qwerty. That's the price we pay for customizability, everybody has a different keybinding 🙂.

One last question. What is the best way to exit BMACRO state? When I do something like this: . (meow-bounds-of-thing) b (buffer) and then G (meow-grab) the whole buffer is changed in to BMACRO "secondary selection" state and the only way I came up with to exit it it to press G (meow-grab) anywhere in the buffer and that cancels the old bmacro selection by "making(grabbing)" a new one. Is this the way to do this or is there another canonical way?

DogLooksGood commented 2 years ago

@krdzo

Also think it would be good to write the key with the name of the command that is bound to it like this: G (meow-grab) (like in the Emacs manual) so that people have an easy way to find out which command you invoking with a key press. Either that or you could indicate at the beginning of this section which meow-setup you using with a link to meow-setup for qwerty.

good points.

What is the best way to exit BMACRO state?

use z(meow-pop-selection), which fallback to meow-pop-grab when there's no selection. check selection command fallback

Ideas, suggestions and PRs for document are welcomed!

DogLooksGood commented 2 years ago

@Inc0, Thanks for the advice!

I'm going to add a table of comparison based on common operations. Could me help me with a list of common operations with more details?

And what else do you think is necessary for migration from Evil(A few users asked about this)?

skmd0 commented 2 years ago

How about something like vim tutor? Boon has something similar (M-x boon-tutorial). I understand it would be a lot of work tho. Maybe start with migration guide for evil users.

I have very limited experience with emacs and modal editing in general, but if you start working on anything concrete then maybe I can help with that.

VitalyAnkh commented 2 years ago

@skmd0 Hi! I’m writing a vim tutor replicate for meow. It would be very nice if we do it together or just discuss.

DogLooksGood commented 2 years ago

@skmd0 @VitalyAnkh It will be great to have our M-x meow-tutorial.

krdzo commented 2 years ago

use z(meow-pop-selection), which fallback to meow-pop-grab when there's no selection. check selection command fallback

Ok. Thanks for the answer.

I will come back with ideas for better documentation. I will close this issue now

skmd0 commented 2 years ago

@VitalyAnkh I agree, I sent you an email about working on meow tutorial.

DogLooksGood commented 2 years ago

I've send invitation from meow-edit to people in this conversation.

DogLooksGood commented 2 years ago

The discussion is enabled for this project.

https://github.com/meow-edit/meow/discussions

VitalyAnkh commented 2 years ago

@skmd0 Hi! I made a tutor draft here: https://github.com/VitalyAnkh/meow/blob/b7100502c8956927ea447aa74b889f9796391171/meow-tutor.org

skmd0 commented 2 years ago

@VitalyAnkh excellent, I will check it out