BoostIO / BoostNote-App

Boost Note is a document driven project management tool that maximizes remote DevOps team velocity.
https://boostnote.io
Other
3.8k stars 372 forks source link

Custom vim mappings #464

Open foxale opened 4 years ago

foxale commented 4 years ago

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

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


IssueHunt Summary ### Backers (Total: $20.00) - [boostio boostio](https://issuehunt.io/u/boostio) ($20.00) #### [Become a backer now!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/464) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/464) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/BoostIO/BoostNote-App/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds.
foxale commented 4 years ago

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')
PeterlitsZo commented 4 years ago

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.

Rokt33r commented 3 years ago

@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'
}
issuehunt-oss[bot] commented 3 years ago

@boostio has funded $20.00 to this issue.