replit / codemirror-vim

Vim keybindings for CM6
https://www.npmjs.com/package/@replit/codemirror-vim
MIT License
268 stars 27 forks source link

Undesirable behavior when cursor navigates wrapped line #133

Closed ggsvr closed 9 months ago

ggsvr commented 11 months ago

When a line gets too long and wraps around in the editor, moving the cursor up and down still treats the wrapped line as one, skipping the visually distinct lines. This does not happen with the default cursor. The issue was observed in Obsidian, which uses this extension for vim support. vimcursor

nightwing commented 11 months ago

This is the way vim itself behaves, j skips line and gj works like a normal down arrow.

firai commented 11 months ago

You can install the https://github.com/esm7/obsidian-vimrc-support plugin in Obsidian to remap j to gj, k to gk and the reverse of the two pairs. This is a fairly common remapping in the vim/neovim world as well.

nightwing commented 9 months ago

Closing as this is the way vim is meant to behave.