silverbulletmd / silverbullet

The knowledge hacker's notebook
https://silverbullet.md
MIT License
2.3k stars 167 forks source link

Vim motion is inconsistent between normal and insert mode #948

Open ndtoan96 opened 2 months ago

ndtoan96 commented 2 months ago

In normal mode, going up and down actually jump between paragraphs. While in insert mode, going up and down actually jump between lines.

https://github.com/user-attachments/assets/b88be0ad-3128-4aca-a79c-43895941ecda

meain commented 1 month ago

One quick hack to have visual line based navigation would be add a VIMRC and add the following.

nnoremap j gj
nnoremap k gk
ndtoan96 commented 1 month ago

One quick hack to have visual line based navigation would be add a VIMRC and add the following.

nnoremap j gj
nnoremap k gk

Yes, I did that already. But considering that silverbullet mostly deals with soft-wrap text and don't need line number consistency, I think we can safely set this as default.

meain commented 1 month ago

Vim's default is not visual line navigation and I think the editor is emulating that.