I am setting up hydra + dap.

Although dap-hydra is provided, it messes up keybinding often times.

Often, I forget the hydra window is open and type something and messes up typing.
Furthermore, when hydra window is not visible, it sometimes seems to catches input away. (maybe a bug)

I think it'd be better if I make the source code buffer read-only while the hydra window is open.

It would be worth considering to make it togglable, so that I keep the hydra window open but interchange between source-edit mode and debug mode (hydra key is used)

I was wondering if there is an available library I could use, (it looks like vim and evil mode does similar thing where you toggle between edit / control mode, but I don't want vim key binding)

Evil seems has the notion of states.
I guess I want two states,

  • regular emacs states (for source editing and moving)
    • it seems like Emacs + Insert state combined in evil
  • debug states (for stepping through, and no source editing)
    • this seems to be Emacs state (where you can only navagiate

So I need to bind two keys..

  • regular emacs state: to get out of evil mode, or turn off read-only mode
  • debug states: to enter into evil Emacs state, or turn on read-only mode

I wonder if there's a better way..


Your Answer

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

Browse other questions tagged or ask your own question.