如何在emacs中永久启用hs-minor模式 [英] How to permanently enable the hs-minor-mode in emacs
本文介绍了如何在emacs中永久启用hs-minor模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用.emacs文件中的thhs代码永久启用hs-minor模式并更改快捷方式:
I am using thhs code in the .emacs file to permanently enable the hs-minor-mode and to change the shortcut:
(setq-default hs-minor-mode t)
(global-set-key (kbd "C-c C-h") (kbd "C-c @ C-h")) ;;hiding block of code
(global-set-key (kbd "C-c C-r") (kbd "C-c @ C-s")) ;;revealing block of code
但是模式没有自动激活。我应该怎么做?
But the mode is not activated automatically. what should i do?
推荐答案
如果你想要它是真正的全球性的,这是诀窍:
If you want it to be truly global, this does the trick:
(define-globalized-minor-mode global-hs-minor-mode
hs-minor-mode hs-minor-mode)
(global-hs-minor-mode 1)
这篇关于如何在emacs中永久启用hs-minor模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文