[GH-ISSUE #464] Custom vim mappings #225

Open
opened 2026-03-03 00:19:27 +03:00 by kerem · 4 comments
Owner

Originally created by @foxale on GitHub (May 7, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/464

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

Originally created by @foxale on GitHub (May 7, 2020). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/464 <!-- Issuehunt Badges --> [<img alt="Issuehunt badges" src="https://img.shields.io/badge/IssueHunt-%2420%20Funded-%2300A156.svg" />](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/464) <!-- /Issuehunt Badges --> # Current behavior No custom vim keyboard mappings in the UI. A [trick](https://github.com/BoostIO/Boostnote/wiki/Vim-mode#custom-keymaps) proposed on legacy BoostNote's wiki page won't work either. ![image](https://user-images.githubusercontent.com/14327763/81305321-7e738380-907e-11ea-9cec-43917e72b150.png) # 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 content --> --- <details> <summary> <b>IssueHunt Summary</b> </summary> ### Backers (Total: $20.00) - [<img src='https://avatars3.githubusercontent.com/u/13612118?v=4' alt='boostio' width=24 height=24> 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. </details> <!-- /Issuehunt content-->
Author
Owner

@foxale commented on GitHub (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')
<!-- gh-comment-id:625430449 --> @foxale commented on GitHub (May 7, 2020): I've done some digging in the meantime, and [here](https://github.com/codemirror/CodeMirror/issues/2840) is the workaround for anyone who comes across this issue: ```js document.querySelector('.CodeMirror').CodeMirror.constructor.Vim.map('jk', '<Esc>', 'insert') ```
Author
Owner

@PeterlitsZo commented on GitHub (Nov 16, 2020):

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.

<!-- gh-comment-id:727730308 --> @PeterlitsZo commented on GitHub (Nov 16, 2020): 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.
Author
Owner

@Rokt33r commented on GitHub (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'
}
<!-- gh-comment-id:903650206 --> @Rokt33r commented on GitHub (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? ```ts interface CodeMirrorMapEntry { toKeys: string // 'jk' keys: string // '<Esc>' context: string // 'insert' } ```
Author
Owner

@issuehunt-oss[bot] commented on GitHub (Sep 14, 2021):

@boostio has funded $20.00 to this issue.


<!-- gh-comment-id:918965733 --> @issuehunt-oss[bot] commented on GitHub (Sep 14, 2021): [@boostio](https://issuehunt.io/u/boostio) has funded $20.00 to this issue. --- - Submit pull request via [IssueHunt](https://issuehunt.io/repos/74213528/issues/464) to receive this reward. - Want to contribute? Chip in to this issue via [IssueHunt](https://issuehunt.io/repos/74213528/issues/464). - Checkout the [IssueHunt Issue Explorer](https://issuehunt.io/issues) to see more funded issues. - Need help from developers? [Add your repository](https://issuehunt.io/r/new) on IssueHunt to raise funds.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#225
No description provided.