Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom vim mappings #464

Open
foxale opened this issue May 7, 2020 · 4 comments
Open

Custom vim mappings #464

foxale opened this issue May 7, 2020 · 4 comments
Labels
feature request 🌟 Issue is a new feature request. funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! needs specs 📐 issues requiring specs

Comments

@foxale
Copy link

foxale commented May 7, 2020

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
Copy link
Author

foxale commented May 7, 2020

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')

@Flexo013 Flexo013 added the feature request 🌟 Issue is a new feature request. label May 7, 2020
@PeterlitsZo
Copy link
Contributor

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 Rokt33r added help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! needs specs 📐 issues requiring specs labels Aug 23, 2021
@Rokt33r
Copy link
Member

Rokt33r commented Aug 23, 2021

@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
Copy link

issuehunt-oss bot commented Sep 14, 2021

@boostio has funded $20.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. label Sep 14, 2021
@kazup01 kazup01 added the hacktoberfest Contribute to the Boost Note and grab the swags! https://hacktoberfest.digitalocean.com/ label Oct 4, 2021
@kazup01 kazup01 removed the hacktoberfest Contribute to the Boost Note and grab the swags! https://hacktoberfest.digitalocean.com/ label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 🌟 Issue is a new feature request. funded on issuehunt 💵 Issue has received funding that will be rewarded to the contributor solving this issue. help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! needs specs 📐 issues requiring specs
Projects
None yet
Development

No branches or pull requests

5 participants