Emacs:全局启用空格模式 [英] Emacs: globally enable whitespace-mode

查看:244
本文介绍了Emacs:全局启用空格模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想全球启用空格模式。我已经在我的.emacs中尝试过:

 (require'whitespace)
(setq-default whitespace-style' (表面尾行空的indentation :: space))
(setq-default空白行列80)
(setq全局空白模式1)
(空格模式1)

但没有成功...我可以通过M + x空格模式启用它,但我想它使其在全球...任何建议?我正在使用GNU Emacs 23.3.1。

解决方案

一般来说,最好通过使用函数调用来启用/禁用模式设置变量(这是您为 global-whitespace-mode 所做的)。



尝试:

 (全球空白模式1)


I want globally enable whitespace-mode. I have tried this in my .emacs:

(require 'whitespace)
(setq-default whitespace-style '(face trailing lines empty indentation::space))
(setq-default whitespace-line-column 80)
(setq global-whitespace-mode 1)
(whitespace-mode 1)

but without success... I able to enable it via M+x whitespace-mode, but I want it to enable it globally... Any suggestions? I am using GNU Emacs 23.3.1 .

解决方案

In general it's best to enable/disable modes by using the function call, not setting the variable (which is what you did for global-whitespace-mode).

Try:

(global-whitespace-mode 1)

这篇关于Emacs:全局启用空格模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆