ink-mde icon indicating copy to clipboard operation
ink-mde copied to clipboard

feat:Support keymap for vim mode

Open GodlessLiu opened this issue 1 year ago • 2 comments

I noticed that the current vim mode does not support custom keyboard mapping For example: I want to setj jin vscode to turn insert mode to normal mode, but I found that the current editor vim option does not support.

stay https://github.com/replit/codemirror-vim Key maps are already supported. Based on this, I added vim settings. the follow is the interface

interface VimOptions {
  map?: MapOption[]    、
  unmap?: UnMapOption[]
  open?: boolean
}
interface MapOption {
  before?: string
  after?: string
  mode?: string
}
interface UnMapOption {
  before?: string
  mode?: string
}

GodlessLiu avatar Oct 22 '23 08:10 GodlessLiu

Hey, @GodlessLiu. I appreciate the PR, but it looks like there are some CI failures. Would you mind addressing those? Also, I'm not necessarily opposed to adding Prettier config, but it should really be a separate PR from the Vim change. Thanks!

davidmyersdev avatar Nov 04 '23 14:11 davidmyersdev

Hey, @GodlessLiu. I appreciate the PR, but it looks like there are some CI failures. Would you mind addressing those? Also, I'm not necessarily opposed to adding Prettier config, but it should really be a separate PR from the Vim change. Thanks!

ok! I will have a try.

GodlessLiu avatar Nov 06 '23 02:11 GodlessLiu