 <p>To do this in gedit, try the <a href="http://www.stambouliote.de/projects/gedit_plugins_old.html" rel="nofollow noreferrer">Tab Converter</a> plugin.</p> <p>(Don't think there's a way to do it directly in Rails.)</p>