Tab vs space madness
- dreadkillz
- Party member
- Posts: 223
- Joined: Sun Mar 04, 2012 2:04 pm
- Location: USA
Tab vs space madness
After seeing how my code on github doesn't look like it does on my computer, I went and learned about all this tab vs space madness and different settings on different computers. Before I was using tabs to align things like = ; etc. BAD BAD BAD. Now I know better. Tab to indent, space to align! Time to go back and fix some of my projects.
Re: Tab vs space madness
Well, Lua doesn't read whitespace so it doesn't matter too much.
Also note that tabs depend on the text editor. Some interpret them as four spaces, some as eight. Always avoid mixing tabs and spaces.
Also note that tabs depend on the text editor. Some interpret them as four spaces, some as eight. Always avoid mixing tabs and spaces.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Tab vs space madness
Some as 6, and some will let you choose
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Tab vs space madness
Or, two spaces for everything, no tabs at all.
EDIT: by the way, this seems to be the recommended way to do it on the Lua Style Guide.
EDIT: by the way, this seems to be the recommended way to do it on the Lua Style Guide.
When I write def I mean function.
Re: Tab vs space madness
Yep, sounds good. In fact Notepad++ has a setting that replaces your tabs with spaces automatically.kikito wrote:Or, two spaces for everything, no tabs at all.
- dreadkillz
- Party member
- Posts: 223
- Joined: Sun Mar 04, 2012 2:04 pm
- Location: USA
Re: Tab vs space madness
I really like tabs though for indenting. I ended up downloading a plugin for np++ that uses tabs to indent and convert them to spaces when used otherwise.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Tab vs space madness
What is this flamebait doing here?
I shall now lock this thread, to prevent endless tab vs space discussions, we all know tab is better anyway. (And vim is better than emacs.)
I shall now lock this thread, to prevent endless tab vs space discussions, we all know tab is better anyway. (And vim is better than emacs.)
Who is online
Users browsing this forum: No registered users and 4 guests