BoostNote-App icon indicating copy to clipboard operation
BoostNote-App copied to clipboard

Custom vim mappings

Open foxale opened this issue 5 years ago • 4 comments

Issuehunt badges

Current behavior

No custom vim keyboard mappings in the UI. A trick proposed on legacy BoostNote's wiki page won't work either. image

Expected behavior

Some way of customizing vim mappings will be possible.

Steps to reproduce

Same as in linked wiki article.

Environment

Desktop/Web

  • Boost Note.next version: 0.4.1
  • OS version and name: macOS Catalina 10.15.4

Is it a bug / missing feature and in such case is there any ETA on making this work?


IssueHunt Summary

Backers (Total: $20.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

foxale avatar May 07 '20 14:05 foxale

I've done some digging in the meantime, and here is the workaround for anyone who comes across this issue:

document.querySelector('.CodeMirror').CodeMirror.constructor.Vim.map('jk', '<Esc>', 'insert')

foxale avatar May 07 '20 18:05 foxale

I find that the application do not store the state of the vim editor. When I close the application, it will lost the set of my vim mapping.

PeterlitsZo avatar Nov 16 '20 04:11 PeterlitsZo

@foxale @PeterlitsZo What kind of information needs to map the Vim? Applying configuration should be quite easy but I'm not sure how should I make the interface for it.

Does this look okay?

interface CodeMirrorMapEntry {
  toKeys: string // 'jk'
  keys: string // '<Esc>'
  context: string // 'insert'
}

Rokt33r avatar Aug 23 '21 10:08 Rokt33r

@boostio has funded $20.00 to this issue.


issuehunt-oss[bot] avatar Sep 14 '21 09:09 issuehunt-oss[bot]