Tabs vs Spaces
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Probably none. I expect everyone just chooses one or the other. Edit: Oh, wait, maybe I did... When I wrote DCL, I used a TAB for the first indent and then SPACEs after that. Does that count?
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
I use the TAB key to insert SPACES.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
We all do. We all use one or the other, perhaps even both. :laugh: But to answer your question, I use spaces. I generally set up the IDE to sub 4 spaces for a tab.
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
I will answer the question you intended to ask. I use tabs. Set to 2 spaces as that is the indentation size I always use. I use the tabs because a lot of my coworkers use 4 spaces and they came just adjust the tab size to give the code the look they are used to.
If you can't laugh at yourself - ask me and I will do it for you.
-
We all do. We all use one or the other, perhaps even both. :laugh: But to answer your question, I use spaces. I generally set up the IDE to sub 4 spaces for a tab.
FreedMalloc wrote:
I generally set up the IDE to sub 4 spaces for a tab.
Infidel! All right-minded people know that a tab stop is every 8 spaces! Anything else is heresy! Your immortal soul will be condemned to an eternity in an infinite loop unless you repent!
Keep Calm and Carry On
-
FreedMalloc wrote:
I generally set up the IDE to sub 4 spaces for a tab.
Infidel! All right-minded people know that a tab stop is every 8 spaces! Anything else is heresy! Your immortal soul will be condemned to an eternity in an infinite loop unless you repent!
Keep Calm and Carry On
Splitter! The Real Distance is obviously 3 spaces per tab.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Beer cans used to have tabs...so I prefer tabs. :)
PartsBin an Electronics Part Organizer - A updated version available! JaxCoder.com
-
Beer cans used to have tabs...so I prefer tabs. :)
PartsBin an Electronics Part Organizer - A updated version available! JaxCoder.com
BUT BOTTLES USE ALL CAPS!!
-
Splitter! The Real Distance is obviously 3 spaces per tab.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Nah I like a tight real estate, 2 spaces per tab works best.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
Tabs because it is just one keypress.
-
FreedMalloc wrote:
I generally set up the IDE to sub 4 spaces for a tab.
Infidel! All right-minded people know that a tab stop is every 8 spaces! Anything else is heresy! Your immortal soul will be condemned to an eternity in an infinite loop unless you repent!
Keep Calm and Carry On
No, TAB stops are by distance, not character count. A half inch is sufficient.
-
I will answer the question you intended to ask. I use tabs. Set to 2 spaces as that is the indentation size I always use. I use the tabs because a lot of my coworkers use 4 spaces and they came just adjust the tab size to give the code the look they are used to.
If you can't laugh at yourself - ask me and I will do it for you.
I would've never thought there could be a good argument for tabs, but this sounds like a good way to satisfy everyone. My only question would be what the code looks like outside the IDE, in GitHub or even Notepad, for example.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing. -
I would've never thought there could be a good argument for tabs, but this sounds like a good way to satisfy everyone. My only question would be what the code looks like outside the IDE, in GitHub or even Notepad, for example.
Robust Services Core | Software Techniques for Lemmings | Articles
The fox knows many things, but the hedgehog knows one big thing.That's exaclty what drove me to ask. GitHub. PR's sometimes don't format correctly.
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
I use 1 tab = 4 spaces. /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
I use whatever the project already uses. Some projects use tabs, some use spaces. When I start new projects, I use whatever the specific team[1] already uses - some teams have tabs set up as default in their IDE, some have spaces. In the rare occasion that I start a solo project with no team I tend to go with spaces. [1] I work across multiple teams.
-
Splitter! The Real Distance is obviously 3 spaces per tab.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
2½ spaces per tab
Nothing succeeds like a budgie without teeth. To err is human, to arr is pirate.
-
Quick survey... How many of you uses tabs vs spaces to indent your code?
If it's not broken, fix it until it is. Everything makes sense in someone's mind. Ya can't fix stupid.
I use the tab key, but my IDE converts them to spaces.
Nothing succeeds like a budgie without teeth. To err is human, to arr is pirate.
-
FreedMalloc wrote:
I generally set up the IDE to sub 4 spaces for a tab.
Infidel! All right-minded people know that a tab stop is every 8 spaces! Anything else is heresy! Your immortal soul will be condemned to an eternity in an infinite loop unless you repent!
Keep Calm and Carry On