Vim: allow left/right (h/l) motions to change lines + up/down (k/j) to move the cursor to the start/end #25510
asqarslanov
started this conversation in
From Vim
Replies: 2 comments
-
Another note: in Helix, the cursor does wrap on left and right movements. In Zed’s Helix mode, this isn’t the case right now. Maybe, this should become enabled by default. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I’ve tried to implement these changes myself in this PR: #25663. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, when using Vim mode, the
h
(left) andl
(right) keys behave exactly like in Vim: when activated at the beginning/end of a line, the cursor doesn’t wrap to the previous/next line. The same is true for thej
(down) andk
(up) motions: at the top/bottom line, when pressed, they are simply ignored instead of moving the cursor to the end/beginning of that line as in insert mode.Some people may prefer when these motions don’t block the cursor and allow to jump over to different lines. It would nice if Zed had configuration options that allowed such behavior.
Here is an illustration of what I’m trying to describe. Suppose, the cursor is
|
.When I press
h
(left) at the beginning of a line, I want the cursor to wrap to the previous line:Or at the bottom line, when I press
j
(down):In Vim, the left/right motions can be configured to change the line like this:
(I didn’t find a way to enable the desired behavior for the up/down motions.)
Zed may add configuration options similar to the following:
Beta Was this translation helpful? Give feedback.
All reactions