silverbulletmd / silverbullet

The knowledge tinkerer's notebook
https://silverbullet.md
MIT License
2.58k stars 189 forks source link

Vim motion is inconsistent between normal and insert mode #948

Open ndtoan96 opened 4 months ago

ndtoan96 commented 4 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 4 months 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 4 months 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 4 months ago

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