开发者

Rails tabs instead spaces

Is there any way to to setup Rails generating files with tabs instead spaces?

O开发者_开发技巧r maybe is there any way to auto replacing spaces to tabs in gedit?

Cause I really prefered tabs and it's really take some time to replace spaces to tabs in new generated files by Rails.

Thanks in advance!


To do this in gedit, try the Tab Converter plugin.

(Don't think there's a way to do it directly in Rails.)


Unfortunately there isn't a simple way. The generators begin copying a template file into your project and then substitute the various variable names into that template.

The template files that are copied into your project use spaces, so you'd need to monkey patch some filter into the generators; a filter that would regex replace the leading spaces with tabs. Not an ideal solution.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜