meow
meow copied to clipboard
Repeat meow-beginning/end-of-thing
Using meow-beginning/end-of-thing
and then repeat
opens a dialog again, but my expectation was that it would repeat without confirmation. The use-case is to "move up by paragraphs", by [p''''''
. How to approach this, I guess either via using BEACON mode or exposing meow-beginning/end-of-thing as keymaps and then bind functions to they keys here?
What you pointed out is a problem in Meow. Also discussed here.
Adding repeat support for thing commands doesn't make sense. since most of them are not expandable. In the previous dicussion, I mentioned a few ideas. Currently, my idea for this purpose is:
(meow-normal-define-key
'("{" . backward-paragraph)
'("}" . forward-paragraph)
'("]" . meow-end-of-thing)
'("[" . meow-beginning-of-thing))
(add-to-list 'meow-char-thing-table (cons ?{ 'paragraph))
(add-to-list 'meow-char-thing-table (cons ?} 'paragraph))
To backward select paragraph, use [ { { { {. To forward select paragraph, use ] } } } }. To backward (and include current paragraph) use . { { { { To forward (and include current paragraph) use , } } } }
How about this? I'm still considering, and I won't make this a default.
I also think it would be great if there was quick way to extend paragraph selection.
What I use right now is:
-
. p
-
;
(optional, if I want to reverse cursor) -
M-{
orM-}
(emacs' native move paragraph keybind)
But pressing all this can be a bit much.
@skmd0 What about my suggestion above? It's available at the moment.
- You don't have to reverse, the direction of
meow-inner-of-thing
,meow-bounds-of-thing
are different., p
will go forward and. p
will go backward. Behaviors controlled by variablemeow-thing-selection-directions
. - You can have multiple keys mapping to the same thing.
I am just describing how I am personally selecting multiple paragraphs. It was not direct reply to your suggestion. I posted it just in case it maybe helps someone.
Sometimes I press ,
when I wanted .
, in that case I reverse the cursor with ;
. That's why I added optional.
Edit: @DogLooksGood oh sorry, you meant what I think of your suggestion. Yeah I think it's pretty good! I will add it to my personal config and try it out.
(meow-normal-define-key
'("{" . backward-paragraph)
'("}" . forward-paragraph)
'("]" . meow-end-of-thing)
'("[" . meow-beginning-of-thing))
I tested this and I think it feels good to use!
(add-to-list 'meow-char-thing-table (cons ?{ 'paragraph))
(add-to-list 'meow-char-thing-table (cons ?} 'paragraph))
But I think this is kind of pointless. For example line in thing selection is l
while in normal mode selection is x
. Probably no need to have 3 different characters for specifing paragraph.
How about this? I'm still considering, and I won't make this a default.
Why not add it to pre-defined layouts? Waiting for more feedback?
In different keyboard layouts, keys for line are different. In case for the differences, char <-> thing is mapped by thing name. I have no idea what is the best, because it depends on how users set their keybindings.
I have three keys for line, my beginning/end is <
and >
.
So I can <<
or >>
.