Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Share Bear posted:

whatever your team does as long as its sane, have your ide or a git thing reformat when you save, done

if your editor/ide/whatever doesn't trim trailing whitespace, you are a monster

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Jabor posted:

also there's a reason we don't do poo poo like
code:
if (foo) { //code
           //here
           }

one of the reasons I like doing this is to segregate "real logic blocks" from "here's a list of things, arguments whatever".

or something like that, in the end it's an arbitrary preference that makes code more readable to a lot of people. much like braces in K&R style being different for functions :shrug:

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Share Bear posted:

whatever your team does as long as its sane, have your ide or a git thing reformat when you save, done

tbh I only kinda care about this poo poo in my personal stuff and for discussing in yospos :henget:

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

prefect posted:

if your editor/ide/whatever doesn't trim trailing whitespace, you are a monster

if anyone cares about this they should set up a commit hook for this imo

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Symbolic Butt posted:

if anyone cares about this they should set up a commit hook for this imo

a commit hook that rejects commits and removes commit privs for the offending user

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
lol why do you even indent poo poo, if you need to move stuff around you'd need to reindent it anyway

never indent anything, it's more practical this way!!1

Share Bear
Apr 27, 2004

i know one my coworkers uses a non-monospace serifed font for coding, THAT will annoy your coworkers more than this poo poo

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I'll start using unicode 0x2002 for indentation instead of spaces

RISCy Business
Jun 17, 2015

bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork
Fun Shoe
anyone who uses spaces over tabs is a disgusting excuse for a human being

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

online friend posted:

anyone who uses tabs over spaces is a disgusting excuse for a human being

RISCy Business
Jun 17, 2015

bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork
Fun Shoe

don't edit my posts bitch

GameCube
Nov 21, 2006

:retab

OldAlias
Nov 2, 2013

use both

Mao Zedong Thot
Oct 16, 2008


use go fmt on save

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

online friend posted:

don't edit my posts bitch

:yosbutt:

Mao Zedong Thot
Oct 16, 2008


prefect posted:

if your editor/ide/whatever doesn't trim trailing whitespace, you are a monster

at new job, probably half of my commit lines in the first month are vim trimming trailing whitespace incidentally because everyone else is a monster

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
we need some gang tags, spaces crew vs tabs crew

faxlore
Sep 24, 2014

a blue star tattoo for you!

I alternate between the two. every other line. hail satan.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

faxlore posted:

I alternate between the two. every other line. hail satan.

you should use four spaces for one indent level, then a tab, then a tab plus four spaces, et cetera

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

prefect posted:

you should use four spaces for one indent level, then a tab, then a tab plus four spaces, et cetera
trigger warn that

wide stance
Jan 28, 2011

If there's more than one way to do a job, and one of those ways will result in disaster, then he will do it that way.
the space bar also makes an annoying sound

Suspicious
Apr 30, 2005
You know he's the villain, because he's got shifty eyes.
this thread makes me want to punch a space indenter irl but i don't work with retards so

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

triple sulk posted:

it does, but why would you use them

because if you add a new line your git diff will only show the new line, not command and the new line

qntm
Jun 17, 2009

prefect posted:

you should use four spaces for one indent level, then a tab, then a tab plus four spaces, et cetera

this is completely legal in Python incidentally

Python code:
if True:
    print("this works") # four space indentation
    if True:
    	print("and so does this") # four spaces, then one tab
    	if True:
    	    print("and this too") # four spaces, then one tab, then four spaces

Japex
Sep 18, 2010

by FactsAreUseless
tabs are loving convenient, but sometimes spaces are necessary especially when being considerate of retards

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i strongly prefer that you use one or the other, but not both

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
// -*- Tabs: 8; Indent: 4 -*-

OldAlias
Nov 2, 2013

Shaggar posted:

    all    man    style.
  hard    tabs    only.

kugutsu
Dec 31, 2008
just do whatever the project you're working on is doing, or whatever most people who write in the language you're using do

i'd prefer to indent with 2 spaces, but when in rome

qntm
Jun 17, 2009

.editorconfig posted:

code:
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4

akadajet
Sep 14, 2003

2 space indent plz. allman or k&r idgaf

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
I seriously know of projects that use 8-char tab stops, 4-char indent, and collapse spaces to tabs

so level 1 is 4 spaces, level 2 is 1 tab, level 3 is 1 tab and 4 spaces, etc.

I call it "the worst of all worlds"

maniacdevnull
Apr 18, 2007

FOUR CUBIC FRAMES
DISPROVES SOFT G GOD
YOU ARE EDUCATED STUPID

eschaton posted:

I seriously know of projects that use 8-char tab stops, 4-char indent, and collapse spaces to tabs

so level 1 is 4 spaces, level 2 is 1 tab, level 3 is 1 tab and 4 spaces, etc.

I call it "the worst of all worlds"

*dramatically whips off glasses* my god

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

maniacdevnull posted:

*dramatically whips off glasses* my god

qntm
Jun 17, 2009

incidentally my point with this post was not to advocate any specific indentation style but to highlight the fact that you should all be using .editorconfig

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

eschaton posted:

I seriously know of projects that use 8-char tab stops, 4-char indent, and collapse spaces to tabs

so level 1 is 4 spaces, level 2 is 1 tab, level 3 is 1 tab and 4 spaces, etc.

I call it "the worst of all worlds"

i think the vim settings involve "smarttabs" and "softtabstop"

RISCy Business
Jun 17, 2015

bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork bork
Fun Shoe
anyone who uses more than 4 spaces per indent should just take a nice swim in a pit of acid

Feisty-Cadaver
Jun 1, 2000
The worms crawl in,
The worms crawl out.
every compiler for every language should just enforce tabs or spaces and fail to compile if you do it wrong.

think about how much time was has been wasted since the 60's or w/e arguing about this poo poo.

tabs spaces whatever who gives a gently caress, just don't mix the two in the same fil/project goddamn

qntm
Jun 17, 2009

Feisty-Cadaver posted:

every compiler for every language should just enforce tabs or spaces and fail to compile if you do it wrong.

think about how much time was has been wasted since the 60's or w/e arguing about this poo poo.

tabs spaces whatever who gives a gently caress, just don't mix the two in the same fil/project goddamn

this is a correct post

Adbot
ADBOT LOVES YOU

Jimmy Carter
Nov 3, 2005

THIS MOTHERDUCKER
FLIES IN STYLE
Let's get to the real issue:

there is a shocking proportion of the population that uses the caps lock key as a shift key.

need to type your password?
*press caps lock*
*press the one character to be capitalized*
*press caps lock*

  • Locked thread