Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ensure newline at EOF in RubyMine

Tags:

macos

rubymine

How does one enforce a newline at end of file in RubyMine (v 4.5.3, on Mac OS)?
e.g., similar to Sublime Text 2

like image 494
Marius Butuc Avatar asked Sep 13 '12 21:09

Marius Butuc


3 Answers

Enable Ensure blank line before end of file on Save option in the Editor settings:

Ensure blank line before end of file on Save

like image 52
CrazyCoder Avatar answered Nov 18 '22 20:11

CrazyCoder


In RubyMine 6 or above (on Mac OSX):

Enable 'Ensure line feed at file end on Save' option in the Editor settings.

enter image description here

like image 7
K M Rakibul Islam Avatar answered Nov 18 '22 20:11

K M Rakibul Islam


RubyMine 2021.2

"Ensure every saved file ends with a line break"

enter image description here

like image 6
Rich Steinmetz Avatar answered Nov 18 '22 22:11

Rich Steinmetz