2011-07-26 83 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

相關問題