MarkEdit icon indicating copy to clipboard operation
MarkEdit copied to clipboard

[Feature Request] Support VIM key-bindings

Open hronro opened this issue 2 years ago • 3 comments

I appreciate the clean and focused interface of MarkEdit for editing purposes. However, as a user who is used to VIM keybindings in my workflow, I find it challenging to fully transition to MarkEdit.

Therefore, I respectfully request that you consider adding VIM keybindings functionality to MarkEdit. This addition will make your editor even more efficient for users familiar with VIM.

Additionally, there is already a plugin called codemirror-vim that implements VIM keybindings, making integration straightforward.

hronro avatar Apr 23 '23 17:04 hronro

Thanks for the feedback. I actually tried the package you mentioned back in the days I started the project; it worked well.

However, other than key bindings, it also has something to do with the UI, such as the status bar:

image

Playground to try it out. To have a perfect integration, we may need to rewrite this with native UI technologies (or at least test if it's good enough), and I doubt if I can achieve this flawlessly as I don't quite use VIM often (😂).

This is still in my backlog, and I may validate the idea at some point.

cyanzhong avatar Apr 24 '23 06:04 cyanzhong

I did an initial investigation and so far, my concern about the UI should be relatively fine. However, I noticed an annoying text rendering issue with the block cursor running on Safari: https://github.com/replit/codemirror-vim/issues/118

While this is not a dealbreaker, it is annoying for those who seek pixel-perfect products.

cyanzhong avatar Apr 26 '23 04:04 cyanzhong

it is annoying for those who seek pixel-perfect products.

Could you please enable the use of experimental options for us? We(esp. I) would like to have access to this feature as soon as possible :)

soomtong avatar Jul 07 '24 08:07 soomtong

I noticed it's quite easy to build a vim extension with the latest MarkEdit-api change. It's just:

import { vim } from '@replit/codemirror-vim';
import { MarkEdit } from 'markedit-api';

MarkEdit.addExtension(vim({ status: true }));
image

cyanzhong avatar Sep 10 '24 12:09 cyanzhong

Example project: https://github.com/MarkEdit-app/MarkEdit-vim.

cyanzhong avatar Sep 16 '24 00:09 cyanzhong