请问,有什么办法把emacs默认绑定的快捷键全清理掉

请问,有什么好的办法把emacs默认绑定的快捷键全清理掉。

试试这个?以前偶然看到过,但没用过。

(use-global-map (make-sparse-keymap))

emacs -Q 里试了一下,挺有用的,eval完了就啥都干不了了 :rofl:

哈哈哈,(不)能用就好 :rofl:

这样会导致文本输入都没办法了

链接下还有一个答案,两者结合一下应该解决了输入的问题:

one indeed wipes out the Global Bindings section completely, and as a consequence, one cannot even type text anymore! In overwhelming majority of cases, one of course would want to restore the ability to type text as it is essential for any text editor anyway. Thus, here is the one way to do that:

(global-set-key [t] #'self-insert-command)
(let ((c ?\s))
  (while (< c ?\d)
    (global-set-key (vector c) #'self-insert-command)
    (setq c (1+ c)))
  (when (eq system-type 'ms-dos)
    (setq c 128)
    (while (< c 160)
      (global-set-key (vector c) #'self-insert-command)
      (setq c (1+ c))))
  (setq c 160)
  (while (< c 256)
    (global-set-key (vector c) #'self-insert-command)
    (setq c (1+ c))))