meow icon indicating copy to clipboard operation
meow copied to clipboard

General improvements

Open MagicRB opened this issue 2 years ago • 6 comments

I've a few ideas, on how to make meow better. I'm a former Evil user, so it may just be evil-isms, but I think they'd improve meow nonetheless.

  • meow-inner-of-thing and meow-bounds-of-thing could use sort of remerse ops, so add parens, remove parens, propose that the ., keys (i think those are the default binds) add braces around selection, inner would be (haei) and bounds would be ( haei ). Perhaps S-., could be removing parens if applicable.
  • meow-yank and friends, could, when something is selected, replace selection.
  • meow-append should imo open insert one char to the right, like in evil

MagicRB avatar Apr 25 '22 09:04 MagicRB

Hi, thanks for your suggestions. I have some explanation here:

meow-yank and friends, could, when something is selected, replace selection. For this one, we have meow-replace. Since in meow it's very common to have a selection, so modification commands will have consist behavior no matter there's a selection or not.

meow-append should imo open insert one char to the right, like in evil meow-append will switch to insert at the end of selection. Since when you don't have a selection, that is zero-width. So the beginning and the end are the same place.

Could you elaborate more about your first suggestion?

DogLooksGood avatar Apr 25 '22 16:04 DogLooksGood

the more i think about it, the more i also feel like some kind of surround-manipulation would be good.

  1. Define some alist of pairs.
  2. Given a selection, 3 commands that a. Remove the first and last char (this is actually a little annoying right now) b. Add a char around the selection, being smart about pairs (made a bit better by paredit/smartparens) c. do a then c.

I say these three should be put behind a single hydra-like interface similar to bounds and inner. I don't see how surround functionality can be added using the thing abstraction, maybe I'm missing some idea though.

eshrh avatar May 09 '22 06:05 eshrh

the more i think about it, the more i also feel like some kind of surround-manipulation would be good.

I'm not sure whether you know of this package but https://github.com/cute-jumper/embrace.el does all of this and works very well with meow. If you end up not implementing this in meow itself it might be worth putting a link in the readme so people who want that functionality can easily add it.

mclearc avatar May 09 '22 14:05 mclearc

Wow, that's a really great package! just installed it and this is exactly the functionality I was looking for, thanks!

Personally, I think some variation of the embrace idea should be implemented in meow, but now I don't really have any urgency because this does everything i need :)

eshrh avatar May 09 '22 15:05 eshrh

Sorry for not getting back, I'm in the middle of my finals (starting to sound like an excuse lol) anyway. Yeah embrace.el looks really good! I'll try it out too. BTW great package!

MagicRB avatar May 09 '22 15:05 MagicRB

I like Embrace, but it does require expand-region to work. Using some principles form Embrace I've started writing my own "surround" adaptation in an effort to keep things light and simple.

If it's of any interest to people here, let me know.

trev-dev avatar Aug 11 '22 21:08 trev-dev

@trev-dev definitely post it! Sounds neat: #273

  1. There has been plenty of discussion on this, still under debate it seems

2 exists, and 3 has also been discussed elsewhere

eshrh avatar Sep 08 '22 08:09 eshrh