-
Notifications
You must be signed in to change notification settings - Fork 249
WIP Fix line wise movement for wrapped line #786
Conversation
|
Finished this PR. Not adding spec, currently there is no test to detect this big behavior change.. need discussion further. |
|
Would it make sense, before merging, to combine all the commits into one? It ends up being a rather small and effective patch. |
7791f5e to
1c6db91
Compare
|
Cool! It would be great to remove the mealy "Currently, vim-mode requires soft line wraps to be disabled" excuse from vim-mode's readme. That said, I run vim-mode always operating on screen lines: https://github.com/bronson/dotfiles/blob/master/.vimrc#L160-L178 So, while I'm happy to see a patch that improves Vim compatibility, I'd probably find a way to turn it off for myself. :) Think this should include the gh, gj, gk, and gl bindings too? |
I read this sentence before, but completely have forgotten! Thanks for noting that. I think we only need to take care of Here is my TODO or plan for this patch.
This patch got unfit of issue title, this is for removing limitation 'softwrap disabled required for vim-mode'. |
|
@t9md I just found the screencount approach has a problem: if you go to the last line of a soft-wrapped long line and press Now put the cursor on "w" in "softwrapped", press 'j' and you'll end up on the third line because the cursor moves by 2 lines - the screencount of the line it's on. I suspect we should not use That should also put the goalColumn behaviour in line with VIM - the cursor in the example above, going down from "w" in "softwrapped", should end up at the end of the second line, not on the space after "this". |
|
@jacekkopecky Yes, I've also noticed this PR include bug. I noticed this is not easy change as I expected at first glance.
Maybe.. Atom itself have only screen line movement motion. So we need to add independent bufferLine movement. So I'm in mood to stop this PR for now, and feeling I need to understand how cursor and motion implemented in Atom and vim-mode world. |
|
Well, at least one goal of this patch has been merged. :) https://github.com/atom/vim-mode/pull/797/files |
|
Close just because it's too old and I cannot remember. |
This PR fix #785, but need discussion.