Closed uqix closed 4 months ago
Thanks for pointing this out! Being able to change modes is definitely something that should be supported.
Ok, the latest commint should now contain a new command while in edit mode, C-c C-m (aka C-c RET). With this you can easily select a mode to change to and the buffer will retain its edit state. Let me know if you have any other issues.
Thanks, will try as soon as it's available in Melpa.
BTW, is it feasible to select mode just by plain old foo-mode
command instead of a new command?
I tried to get this to work but I was running into difficulty as changing the major mode messes with local variables. I tried to get around this with hooks but I couldn't figure it out.
Is it about permanent-local
property?
oh, that's interesting. I wasn't aware of this permanent-local property. Let me see if I can get it to work with this. Also changing the major mode seemed to disable the minor mode, I'll have to look into that too.
Setting permanent-local
did the trick. I'm making a release with the changes so far.
Given
test.yaml
:Steps to reproduce:
yaml-pro-edit-ts-scalar
on keya
's value*yaml-pro-edit*
buffer displayed infundamental-mode
json-ts-mode
C-c C-c is undefined