主要是为了按q方便退出,默认在emacs键位模式下,按q都可以退出,但是现在新窗口都自动进入了evil模式。
为了解决这个问题,我现在是这样写的,我的全部配置很简单,在这里 GitHub - heheda123123/emacs.d
(add-hook 'lsp-bridge-ref-mode-hook '(lambda () (evil-emacs-state t)))
(add-hook 'embark-collect-mode-hook '(lambda () (evil-emacs-state t)))
(add-hook 'helpful-mode-hook '(lambda () (evil-emacs-state t)))
(add-hook 'magit-mode-hook '(lambda () (evil-emacs-state t)))
(add-hook 'special-mode-hook '(lambda () (evil-emacs-state t)))
But there is a problem. For example, I checked C-h v for the first time to check the argv variable. The new pop-up window did enter the emacs key state, and now press q to exit. But if you press C-h v again to view the argv variable, the previous buffer will be reused. This time, you will enter the evil key state. How can you keep the specified window in the emacs key state?
I searched online for a shackle package that can manage windows. It seems that the custom attribute can be set, but it doesn’t work after trying. Can someone give me some pointers?
后面的两段怎么自动变成英文了,我再复述下,就是如果两次用C-h v打开同一个词条,第一次会是emacs键位,按q关闭之后,第二次会复用buffer又进入evil键位了,怎样保持emacs键位。另外有个包叫shackle可以管理窗口,custom属性好像可以控制新窗口,但是试了下都不行,不会用,有大佬指点下吗