2013-04-11 55 views
1

Aquamacs 2.4 OSX已经被设计为使用Preferences.elcustomizations.el代替~/.emacs使用Aquamacs 2.4自动显示空白字符(OSX山狮)


Preferences.el

(require 'whitespace) 

;; This is for files previously created and then opened with Aquamacs. 
(global-whitespace-mode t) 

;; This is needed for new files and/or the scratch buffer. 
;; Add additional hooks for each mode desired. 
(add-hook 'text-mode-hook 
    (function (lambda() 
       (whitespace-mode t)))) 

;; These are keyboard shortcuts -- \C is ctrl; a hyphen is a pause. 
(global-set-key "\C-cw" 'global-whitespace-mode) 
(global-set-key "\C-c\C-w" 'whitespace-mode) 
(global-set-key "\C-c=t" 'global-whitespace-toggle-options) 
(global-set-key "\C-c_t" 'whitespace-toggle-options) 
+0

您不应该以这种方式修改问题。您可以发布自己的解答解释您的解决方案。原来的问题一定要保持,所以答案是有道理的。 – brasofilo 2013-04-14 20:02:40

+0

谢谢您的建议以备将来参考。我很担心从'ataylor'偷窃雷声,因为我非常感谢他的帮助。我希望能够包含解决方案的一些代码(不适用于评论),但我不想让它看起来好像我用我自己的答案对他进行了提升(这会使他的帮助减弱慷慨提供)。为了保持这个问题,我会尽量保持平衡,并且不要试图让任何有时间帮助我达成解决方案的人。 – lawlist 2013-04-14 20:31:49

+1

没有问题,你写你自己的扩展别人的答案。只要信用来源,它全是k。事实上,你自己的解释可能会帮助其他人,就像@ ataylor's帮助你:) - 我强烈建议你将问题恢复到原始问题并发布答案。 – brasofilo 2013-04-14 20:34:55

回答

1

M-x customize-group whitespace,和使全球空白模式。如果您不喜欢显示空白的默认方式,请自定义空白显示映射。

+0

非常感谢你 - 你的回答,加上这个键盘快捷键的解释帮助我理解发生了什么:http://oracc.museum.upenn.edu/doc/builder/emacs/aquamacs/ – lawlist 2013-04-11 20:22:17

+0

这个网页也是一个必须阅读的初学者:http://emacswiki.org/emacs/WhiteSpace – lawlist 2013-04-11 20:36:06

+0

@lawlist遵循EmacsWiki的意见,只是非常小心。你阅读的大部分内容都是过时的,黑客的,或完全错误的。 – lunaryorn 2013-04-11 21:11:09