-
#1
空格党+1小麋鹿自己~小麋鹿自己~
-
#2
tab设置为4个空格xmlzjxmlzj
-
功夫熊猫 楼主#3
还是插件 Tab 替换成 Space 好...
-
#4
我是用tab的跟影片里的男主角一样
位置很重要,跟影片里的男主角一样
位置很重要, -
#5
缩进 indentation 跟对齐 alignment 不是一回事~理解它们的区别为本,缩进在保持一致性的情况下用 tab 或者空格都没有问题,对齐使用 tab 则可能会因为编辑器设置的不同影响代码文本的显示。在此基础之上,遵循或者制定项目代码规范。理解它们的区别为本,缩进在保持一致性的情况下用 tab 或者空格都没有问题,对齐使用 tab 则可能会因为编辑器设置的不同影响代码文本的显示。在此基础之上,遵循或者制定项目代码规范。
-
#6
tabover spaceover space
-
#7
CodingStyleTabs are 8 characters, and thus indentations are also 8 characters.
There are heretic movements that try to make indentations 4 (or even 2!)
characters deep, and that is akin to trying to define the value of PI to
be 3.
Rationale: The whole idea behind indentation is to clearly define where
a block of control starts and ends. Especially when you've been looking
at your screen for 20 straight hours, you'll find it a lot easier to see
how the indentation works if you have large indentations.
Now, some people will claim that having 8-character indentations makes
the code move too far to the right, and makes it hard to read on a
80-character terminal screen. The answer to that is that if you need
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.
In short, 8-char indents make things easier to read, and have the added
benefit of warning you when you're nesting your functions too deep.
Heed that warning.
Tabs are 8 characters, and thus indentations are also 8 characters.
There are heretic movements that try to make indentations 4 (or even 2!)
characters deep, and that is akin to trying to define the value of PI to
be 3.
Rationale: The whole idea behind indentation is to clearly define where
a block of control starts and ends. Especially when you've been looking
at your screen for 20 straight hours, you'll find it a lot easier to see
how the indentation works if you have large indentations.
Now, some people will claim that having 8-character indentations makes
the code move too far to the right, and makes it hard to read on a
80-character terminal screen. The answer to that is that if you need
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.
In short, 8-char indents make things easier to read, and have the added
benefit of warning you when you're nesting your functions too deep.
Heed that warning. -
功夫熊猫 楼主#8
缩进是为了对齐~
-
#9
我觉得没有关系呀关键是代码质量,好不好维护。最好不要在这样的问题上浪费时间呢。关键是代码质量,好不好维护。最好不要在这样的问题上浪费时间呢。
-
#10
用vs2015的路过,表示大部分大码程序都会自己对齐啦dittoditto
-
#11
再加一个问题~熊猫大括号换行吗?熊猫大括号换行吗?
-
功夫熊猫 楼主#12
huan bu huan bu neng ren
-
#13
tab设为4个空格+1,强制要求的因为不是所有的编译器支持tab,有些格式会乱因为不是所有的编译器支持tab,有些格式会乱
-
#14
tab档最喜欢简洁又整齐的code,alignment真的很重要,否则会影响到心情最喜欢简洁又整齐的code,alignment真的很重要,否则会影响到心情
-
#15
到minification都浮云鸟
-
#16
Linus Torvalds 的Kernal Coding Style