2012-09-13 20 views

回答

33

啓用確保文件的結束之前的空白行上的保存在Editor設置選項:

Ensure blank line before end of file on Save

+16

在RubyMine 6中,標籤是「確保在保存時在文件末尾換行」 – tee

5

在的RubyMine 6或以上(在Mac OSX):

啓用'確保在處的文件末尾保存換行'選項設置。

enter image description here

3

RubyMine以及許多其他編輯器支持基本配置的EditorConfig標準。

你可以通過把一個名爲.editorconfig文件在你的項目的根目錄執行在每個文件末尾的新行:

# top-most EditorConfig file 
root = true 

# Unix-style newlines with a newline ending every file 
[*] 
end_of_line = lf 
insert_final_newline = true 

這是可能的禁用特定的文件類型或文件名設置。