没办法,个人使用时的心理模型跟 org-mode 的 source code 编辑一样,平时操作起来按 快捷键是靠肌肉记忆,hack 了一下基本上跟 org-mode 一样了:
(defun my/ad-comment-edit (orig-fun &optional block)
(if (string-prefix-p "*edit-indirect " (buffer-name))
(progn
(if (buffer-modified-p)
(edit-indirect-commit)
(edit-indirect-abort)))
(funcall orig-fun block)))
(advice-add 'comment-edit :around 'my/ad-comment-edit)
另外,我感觉如果出现嵌套编译注释的情况,就该反思是不是注释写得太复杂了,快捷键一 般来讲应该是为常用直观的场景进行设置,如果不常用估计也记不住。