2011-07-26 35 views
1

我已经在Emacs中设置了空白模式,只显示标签,空格和硬空格。但是,我无法摆脱换行符。请参见下面的截图,它们被显示为灰色光标:如何在Emacs Blank模式下不显示换行符

Screenshot

+3

你可能会考虑换出BlankMode为[空白符(http://www.emacswiki.org/emacs/WhiteSpace),它已经取代了它。 – razlebe

+1

那些投票迁移到超级用户 - [编程工具是关于这个主题](http://stackoverflow.com/faq#questions)。 – 2012-01-11 10:41:08

回答

1

您需要编辑您的Emacs配置从blank-chars BlankMode选项删除newline元素(你还没有告诉我们!)。

根据BlankMode documentation,空白字符选项决定BlankMode显示哪些空白字符。

从长文档中的blank-mode.el package

(defcustom blank-chars 
    '(tabs spaces trailing lines space-before-tab newline 
    indentation empty space-after-tab) 
    "*Specify which kind of blank is visualized. 

It's a list which element value can be: 

    trailing  trailing blanks are visualized. 

    tabs  TABs are visualized. 

    spaces  SPACEs and HARD SPACEs are visualized. 

    lines  lines whose have columns beyond 
      `blank-line-column' are highlighted. 
      Whole line is highlighted. 
      It has precedence over 
      `lines-tail' (see below). 

    lines-tail lines whose have columns beyond 
      `blank-line-column' are highlighted. 
      But only the part of line which goes 
      beyond `blank-line-column' column. 
      It has effect only if `lines' (see above) 
      is not present in `blank-chars'. 

    space-before-tab SPACEs before TAB are visualized. 

    newline  NEWLINEs are visualized. 

    indentation 8 or more SPACEs at beginning of line are 
      visualized. 

    empty  empty lines at beginning and/or end of buffer 
      are visualized. 

    space-after-tab 8 or more SPACEs after a TAB are visualized. 

Any other value is ignored. 
+0

就是这样,在我的.emacs文件中,我只有以下内容,这意味着只有制表符和选项卡和空格之前的空格应该可见,但我看到换行符:(空白字符(引号(制表符前面的空格)空格))) – mart1n

+0

切换到空白解决了我的问题。谢谢! – mart1n

+0

如何禁用此功能,我找不到空白 - 任何文件中的任何位置 – Siddharth

相关问题