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

Support modal remapping #93

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Support modal remapping #93

merged 1 commit into from
Jun 22, 2022

Conversation

k0kubun
Copy link
Contributor

@k0kubun k0kubun commented May 7, 2022

Close #89

Example

default_mode: insert
keymap:
  - mode: insert
    remap:
      Esc: { set_mode: normal }
  - mode: normal
    remap:
      i: { set_mode: insert }
      h: Left
      j: Down
      k: Up
      l: Right

@k0kubun k0kubun mentioned this pull request May 7, 2022
@k0kubun k0kubun merged commit 18ee84e into master Jun 22, 2022
@k0kubun k0kubun deleted the mode branch June 22, 2022 04:32
@cipherlogs
Copy link

this is a terrific feature if it can be added, I have tested the code but it is not working at all

here are my bindings

keymap:
  # - name: Global
  - mode: insert
    remap:
      j:
        remap:
          j: {set_mode: normal}
          k: Esc
          l: C-space
        timeout_millis: 100

  - mode: normal
    remap:
      i: {set_mode: insert}
      h: Left
      l: Right
      k: Up
      j: Down

to trigger normal mode I have to go jj but it doesn't work
also I have tried to add nested remaps inside normal mode it doesn't work at all

I hope this feature doesn't die. if we can do a true vim like modal remapping that would be amazing.

@k0kubun
Copy link
Contributor Author

k0kubun commented Aug 31, 2022

Could you make it a separate issue so that I can remember it when I work on open issues?

@cipherlogs cipherlogs mentioned this pull request Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vim-like modal editing
2 participants