0

I want to create a new mode other than normal, visual, or insert because I want to:

  • change the functions of all keys at once
  • allow remapping
  • preserve the mappings of other modes and retrieve when go other modes
  • if plugins do mappings for other modes, don't interfere with it

The last part is specifically important because my current system has problem with it; It remaps almost all the normal mode commands and preserves current mappings before it and retrive when exitting command is called, and now appears to delete other plugin's mappings when exitting. If Nvim has creating-new-mode feature, it can be solved, I think. Or any other solution?

3
  • 1
    You can't create new modes at runtime. You would have to do it at the source code level. Good luck with that.
    – romainl
    Jan 11, 2023 at 7:26
  • 1
    Is there any good tag in this site for exploring and asking about source-level hacks?
    – Dugesia7
    Jan 11, 2023 at 7:53
  • Just read the source.
    – romainl
    Jan 11, 2023 at 8:00

1 Answer 1

0

Submode plugin satisfied my needs.

3
  • Maybe you could extend your answer by explaining which part of the question requirement are covered by the plugin? Jan 13, 2023 at 11:25
  • If you are good with your answer maybe could you accept it using the v button next to the arrow voting buttons. After 2 days you are allowed to accept your own answer. It let the question rest :-) Feb 12, 2023 at 14:10
  • Yes, it would be nice to show us how you do use that plugin to solve your case.
    – gildux
    Feb 12, 2023 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.