Why meow-append behaves the same way when there's no region? #87
Replies: 2 comments 9 replies
-
I think it would make sense to add an option for |
Beta Was this translation helpful? Give feedback.
-
I believe Meow would work more intuitively if no selection was actually treated as a selection of length one. In addition, I believe that with all selections, when the point is at the end of the selection, the point should actually be moved one character earlier, so the point is visually part of the selection. For the following, I'll describe using the default qwerty keymap. With the current behavior, the default "reset" state of having no selection causes multiple commands to act the same way in a confusing way.
I understand that changing core default behavior is probably not desired, but maybe there could be a flag to enable this as alternate behavior? I believe this could be done with chaining commands, and would make the logic of using Meow more consistent. In fact, the no-selection is a selection of one char paradigm is actually already applied for One serious downside of this change is that the commands Also, selections that include a new line would also have to be rendered specially. Evil mode does this by showing the selection region all the way to the edge of the screen past the point. |
Beta Was this translation helpful? Give feedback.
-
The question have been asked a few times, so I migrate my answer to Q&A.
meow-insert
means insert at the beginning of region, andmeow-append
means append at the end of region. So when there's no region, insert and append will behave the same. The behavior is expected and reasonable.It's simple to write your own function to move the cursor when no selection available. BUT, this doesn't get to the root of the problem.
For example, if you write your own
meow-append
.Press
a
, cursor staysPress
a
, cursor movesweird, doesn't it?
In Vim, cursor is located on one character. In Emacs, cursor is located between two characters. (no matter the cursor shape)
In Kakoune, there's always a selection, with minimal width 1, but we can't do this in Emacs.
The only solution is to hack the cursor position, (like Evil does), I don't know what Evil does, but I have implemented one in Meow.
NOT RECOMMENDED. I didn't even mention the feature in document. Since Meow is not Evil, I enjoy simplicity.
Beta Was this translation helpful? Give feedback.
All reactions