philihp All American 8349 Posts user info edit post |
Tab characters (0x09) in code should be:
A: converted to 2 spaces B: converted to 3 spaces C: converted to 4 spaces D: converted to 5 spaces
can we get some consensus on this? plees? 3/26/2008 4:28:19 PM |
quagmire02 All American 44225 Posts user info edit post |
i thought tab was 6 or 8, actually 3/26/2008 4:31:53 PM |
Stein All American 19842 Posts user info edit post |
It should display as 5 spaces initially, but it should still be a tab. 3/26/2008 5:01:34 PM |
Rat Suspended 5724 Posts user info edit post |
so basically i need to put something like
[info="hi" and this="something" ] into a single string and be able to use " 's
what do i do again?
is it myString = +@" my stuffwith "" 's and more stuff";
? 3/26/2008 5:15:08 PM |
Shaggy All American 17820 Posts user info edit post |
tabs should remain tabs whenever possible. Otherwise 1 tab = 5 spaces. 3/26/2008 5:49:26 PM |
smoothcrim Universal Magnetic! 18968 Posts user info edit post |
D or B, depending on how long you want your lines to be 3/26/2008 6:44:22 PM |
qntmfred retired 40806 Posts user info edit post |
i've always used 2 or 4
moreso 2 in the last few years 3/26/2008 6:51:39 PM |
DirtyMonkey All American 4270 Posts user info edit post |
i use 4 spaces.
most of the time i use vim for programming via ssh. i'm no vim expert by any means, so i'm not sure if this is common knowledge or not but if you are in command mode and type "gg=G" it will do auto-indenting. it's pretty handy. 3/26/2008 8:21:27 PM |
gs7 All American 2354 Posts user info edit post |
2 usually, I indent a lot and don't like side scrolling more than I have to. 3/26/2008 8:47:31 PM |
dakota_man All American 26584 Posts user info edit post |
I used to use 2, now I use 3. But it should be up to the user to choose how tabs are displayed. 3/26/2008 8:59:06 PM |
Prospero All American 11662 Posts user info edit post |
programming = 2 spaces word processing = 5 spaces 3/26/2008 9:10:54 PM |
qntmfred retired 40806 Posts user info edit post |
who the fuck uses spaces anyways
[Edited on May 17, 2013 at 9:25 AM. Reason : viva la tab] 5/17/2013 9:25:05 AM |
dtownral Suspended 26632 Posts user info edit post |
word processing = 5 spaces 5/17/2013 9:58:55 AM |
BigMan157 no u 103354 Posts user info edit post |
tabs 4 lyfe 5/17/2013 10:41:43 AM |
gs7 All American 2354 Posts user info edit post |
Somehow I've changed to 4 spaces and not realized it. 5/17/2013 12:12:49 PM |
Shaggy All American 17820 Posts user info edit post |
lol I already posted the same thing
[Edited on May 17, 2013 at 12:27 PM. Reason : .] 5/17/2013 12:26:55 PM |
quagmire02 All American 44225 Posts user info edit post |
i would like to change my answer from 5 years ago to "4 spaces" 5/17/2013 1:55:15 PM |
Noen All American 31346 Posts user info edit post |
4 5/17/2013 2:35:41 PM |
Specter All American 6575 Posts user info edit post |
as a programmer, 4 spaces is perfect for me.
2 spaces would be too annoying. 5/17/2013 2:51:46 PM |
FroshKiller All American 51913 Posts user info edit post |
...whatever the specifications state. Jesus Christ, guys. 5/17/2013 2:53:26 PM |
quagmire02 All American 44225 Posts user info edit post |
^ inorite, we're in our 20s 30s 5/17/2013 3:18:33 PM |
philihp All American 8349 Posts user info edit post |
BTTT 10/30/2016 7:53:06 PM |
smoothcrim Universal Magnetic! 18968 Posts user info edit post |
Quote : | "tabs should remain tabs whenever possible. Otherwise 1 tab = 5 spaces." |
10/30/2016 8:55:58 PM |
Wolfmarsh What? 5975 Posts user info edit post |
It depends on what style guide and language you are using. It can also vary in a single project per file type.
For example, in python if you follow PEP 8, indents are 4 spaces.
If you use YAML and follow their recommendations, it's 2 spaces in those files. 10/31/2016 8:40:22 AM |
darkone (\/) (;,,,;) (\/) 11611 Posts user info edit post |
This is the sort of thing I let the IDE worry about. 10/31/2016 1:43:40 PM |
wdprice3 BinaryBuffonary 45912 Posts user info edit post |
Tabs should be converted to sass.
] 11/1/2016 8:22:39 AM |
aaronburro Sup, B 53136 Posts user info edit post |
They should be whatever your team's style guidelines say. TThis is code-religion territory 11/2/2016 12:53:06 AM |
wwwebsurfer All American 10217 Posts user info edit post |
Quote : | "They should be whatever your team's style guidelines say." |
Whoever writes the checks determines the tab to space ratio. Though several IDE's I've used will convert this stuff for you on the fly, and if your IDE of choice doesn't write a script to do it. Do whatever you want in your local repo, just get in line with the guidelines before commit.
... for personal projects though: 4 MONOSPACES TO THE GRAVE 11/2/2016 2:45:44 AM |