Vim emulation: move by paragraph instead of display line#784
Vim emulation: move by paragraph instead of display line#784jeremypw merged 15 commits intoelementary:masterfrom
Conversation
|
@mcclurgm You need to fix a conflict on this before I review. |
|
Done. Sorry for the delay. |
There was a problem hiding this comment.
In this PR, j and k commands do not seem to work the same as in vim. In vim, in a document with paragraphs containing word wrapped lines and more than one sentence these commands move up and down between the same offset within adjacent paragraphs (if there is a blank line between paragraphs then it moves to the start of that blank line). In this PR, the commands always move to the beginning or end of the next or previous paragraph.
0, $ and A work the same as in vim.
|
Oh yeah, looks like |
|
Yes, please do that. |
|
Done |
Part of splitting #633.
Line-based movement commands (eg
j,k,0,A,$) in vi/vim work by newline-ended lines, not visual lines. Vim docs. This is an issue when line wrapping is enabled. This PR fixes the behavior in the plugin to move by newline-ended lines, instead of visual lines.Movement by visual lines works by appending
gto the front (as ingj, docs), which is a command we could implement. But I think that's a separate PR, since it's much more complex.