2空格或1制表符,Rails社区中的缩进标准是什么? [英] 2 Spaces or 1 Tab, what's the standard for indentation in the Rails Community?

查看:113
本文介绍了2空格或1制表符,Rails社区中的缩进标准是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,从插件生成的大部分HTML / XML / HAML使用2个空格而不是1个选项卡。我使用textmate,并且为HAML / HTML / XML设置了4个空格,并为Javascript / Ruby添加了2个空格,但我只需按Tab键一次即可获得很好的缩进效果。按空格键两次并删除两次似乎太多了:p。

I've noticed that most of the HTML/XML/HAML that gets generated from plugins uses 2 spaces instead of 1 tab. I use textmate and have tabs set to 4 spaces for HAML/HTML/XML and 2 spaces for Javascript/Ruby, but I only have to press the tab key once to get nice indentation. Pressing the space bar twice and delete twice seems like too much work :p.

您是手动输入两个空格,还是将中间层转换为两个空格?或者只是少数人使用标签?

Do you manually type two spaces, or is some middle layer converting tabs to two spaces? Or do just a few of you use tabs?

推荐答案

2个空格是一致的。

这篇关于2空格或1制表符,Rails社区中的缩进标准是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆