ENIGMA Forums
General fluff => General ENIGMA => Topic started by: freezway on October 18, 2010, 09:17:39 pm
-
Dear TGMG,
USE SPACES! NO ONE LIKES TABS!
-
I like tabs
-
I like consistency, and tabs don't offer that. Wherever I open my code, I want it to look the same.
{
float a = 0,
b = 1;
I don't like going out of my way to make it [tab]float...[tab][space][space][space][space][space]b...
I like pressing tab two or three times, then just backspacing to where it lines up.
I also like leaving indentation on blank lines. That way, I just click where I want to insert, and press enter. But no, damn IDEs keep stripping trailing blanks.
Anyway, iirc tabs are illegal in YAML, Firefox strips them from non-first-char pastes, replacing them with spaces.... they're a dying breed.
-
Tabs are illegal for indentation in YAML. They are legal, however, in string literals.
For example, the following is valid:
---
description: |
What<tab>now?!
...
-
...okay.
:P
-
I like stripped blanks.
Just click the line, backspace, then enter.
-
Tabs are AWESOME for consistency.
The only thing that sucks is inconsistent combination of tabs and spaces.
-
Which is the only way to consistently pull of the code I posted above. Otherwise, the b could be misaligned with the a for everyone not using a tab width of 2, or whatever.
-
Which is why you don't use arbitrarily-indented blocks. It works for every case but that one which gets a little ugly:
float
a = 0,
b = 1;
Where it does work:
name = function(
foo, bar,
baz, quux
);
for (
initializer;
condition;
update;
) {
stuff;
}
name = {
initializer,
list
};
Constructor::Constructor(
arguments
) : initializer(foo), list(bar) {
stuff;
}
Constructor::Constructor(
arguments
) :
initializer(foo),
list(bar) {
stuff;
}
...and so on, with tweaks for your style preferences.
-
I also like leaving indentation on blank lines. That way, I just click where I want to insert, and press enter. But no, damn IDEs keep stripping trailing blanks.
YES! can't stand
int blah(int foo) {
bar;}
-
I just use xcodes formatting which uses tabs, it automatically does it when I press newline and the formatting tools such as reindent use it to and tbh its a habit. Why is it such a big deal? Iv'e never had a problem using tabs, and it will be kinda hard to remember where i have used tabs and where i have used spaces.
-
its annoying to bet things to line up. Can't Xcode use spaces?
-
No tabs.
-
Can't you guys just run some kind of automated script to replace tabs with spaces? Perhaps some SVN plugin?
-
Can't you guys just run some kind of automated script to replace tabs with spaces? Perhaps some SVN plugin?
expand -t 2 file
-
i like 4, not 2, maybe thats just me....
-
I have changed some settings around in xcode so hopefully that should help.
-
Hot.