Replies: 7 comments
-
I think the editor render whitespace characters is more better, it can edit all character we see . In the vim , if I want select the If you want to enter insert mode at the end of line and not use [keys.normal]
# use `li` or remap `after insert`
a = ["move_char_right","insert_mode"] Maybe there are other ways |
Beta Was this translation helpful? Give feedback.
-
I'm afraid that this would be non trivial to implement and break the intended use of some commands (requiring inconsistent workarounds that fail easily). For example to cut and paste a line you'd When working near the line bounds I personally tend to use movements that work regardless of where the cursor is like these:
|
Beta Was this translation helpful? Give feedback.
-
@CptPotato cut and paste is already quite tricky for line mode. A lot of functionality currently requires the use of I think the problem is not so much that you can move the character onto the newline, but that this is the natural resting position of the cursor when it moves between lines. If I move up and down the buffer I generally do not want my input to sit on the newline but the last character typed. That's also where This would effectively mean that rather than tracking just the vertical position, helix would track additionally if I'm on the newline. Then if my character is actually resting on the newline then moving up and down also moves it to the newline position. This would also be closer to what vim is doing where it knows that if my cursor is resting on ( The only effect of this is a change to how up/down operates with regards to the newline. It would basically mean that for as long as I'm not already resting on the newline, I would not move onto it by going up and down on the buffer. It also means that if I'm navigating up and down on the newline, i will be resting again on a newline in the next line, even if that's further to the right than what I'm on at the moment (again, what vim does except different). |
Beta Was this translation helpful? Give feedback.
-
I implemented a prototype of this in #4204 now and I really like how it functions. I think it strikes a pretty good balance between how helix works and how vim works. It causes left/right movement to be contained within the line you are on, and the vertical movement is either staying on the newline character or left of it. |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? The default behavior is very jarring. |
Beta Was this translation helpful? Give feedback.
-
The two situations I run into this is:
In both of these cases, if I type anything, that text ends up being entered at the start of the next line, not the end of the current line. This feels weird (and possibly unintended?) to me, especially because if I hit Additionally, when I do this, I cannot use I like mitsuhiko's PR #4204, and may end up using it myself, however I believe it addresses different behaviour than what I've mentioned above. (I'm not sure if my comment warrants a new issue, or if it fits here) |
Beta Was this translation helpful? Give feedback.
-
People know this already, but for a better overview and for people joining the discussion: PR #4204 was closed because the movement implementation changed internally. The changes are picked up and applied for the new implementation in PR #10576, which also addresses the append behavior with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Today if you use
goto_line_end
you end up resting on the last character of the line which also matches the behavior in vim. That means you usea
to go into insert mode to append something. However it's also possible to move the cursor into the newline going up and down at which point it's necessary to usei
to insert as otherwise you write into the next line.I think it would be convenient to have an option that would generally prevent the move of the cursor onto the newline character by going up and down through the buffer. I ran into this trying to build line-restricted movements (#4204).
Beta Was this translation helpful? Give feedback.
All reactions