Tabs vs Spaces and Vim vs Emacs (1 Viewer)

makems

LIFE MEMBER
Sep 23, 2011
3,440
27,728
Ingleby Barwick,,Teesside
Funster No
18,264
MH
Sadly had to give up
Exp
2010-2017
There is an app (OnSong) I use for displaying chords and lyrics where the difference between tabs and spaces is crucial.
Using tabs the chords can become displaced from the correct position above the lyrics whereas spaces keep them in the right place. Its a pain using spaces but in this case essential. Importing a file from Word where tabs have been used is a nightmare. It might look OK in Word but chords are all over the place in the app.
 

sedge

Funster
Jul 7, 2009
5,510
13,146
Nr Jct 3 M6
Funster No
7,396
MH
C class
Exp
Aug 09 to date 9,000 miles!
Why on earth, if you happen to need an unspecified number of spaces in something, do you (apparently) need to keep pressing the space bar? Is it a retrograde feature of Apple devices or summat? I've never ever needed to use anything made by them so no idea! Why on earth in this day and age would you design a device that operates word processing as if it was a manual typewriter?
 

makems

LIFE MEMBER
Sep 23, 2011
3,440
27,728
Ingleby Barwick,,Teesside
Funster No
18,264
MH
Sadly had to give up
Exp
2010-2017
Why on earth, if you happen to need an unspecified number of spaces in something, do you (apparently) need to keep pressing the space bar? Is it a retrograde feature of Apple devices or summat? I've never ever needed to use anything made by them so no idea! Why on earth in this day and age would you design a device that operates word processing as if it was a manual typewriter?
There is no need to use the space bar on a Macbook any more than there is on a Windows laptop - which is what annoyed the fella in the vid. the tab button works fine on Apple devices.
 

sedge

Funster
Jul 7, 2009
5,510
13,146
Nr Jct 3 M6
Funster No
7,396
MH
C class
Exp
Aug 09 to date 9,000 miles!
But if you just happen to need a few more spaces than the Tab button provides, in Windoze you simply keep the Space bar depressed for a bit and do NOT have to keep on hitting it repeatedly.

Hah but of course, the forum's software then just automatically removes all the ruddy random spaces I inserted when spacing so there is only 1 space between each word.
 
OP
OP
Gromett
Feb 27, 2011
14,768
76,324
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
It is a programmers joke and should not be read out to any other area other than programming.
The level of indentation makes code more readable.

This is seriously bad code, but just meant as an example of how indents make things readable.

1699715483976.png


Without indents the code looks like this and is much harder to read.
1699715549323.png


So. A programmer will hit the tab key for each level of indentation. The programmer can set this to be spaces or a tab symbol. and the number of spaces or equivalent can be set in the developers editor.
Most people these days use 4 spaces or set the tab to be equal to 4 spaces. Old school used to 8, and in some languages only 2 is used.

No one actually sits there and hits the space bar 8 times. This was required to make the joke work. If she hit the tab and it inserted 8 spaces he wouldn't have heard it.

There are battles about which is better. The old school people like me stick with tabs, the youngsters who have never known resource constraints tent do use spaces. Their argument about making it easier to align stuff doesn't hold water with me.
Tabs are just more space efficient, but I don't get riled up about it.

These days a modern code editor can load and convert to your preferred system and when you push to the repo you can add a step to convert to the required one. So it can all be automated and everyone is happy.

But the 8 spaces she did vs his tab was pushed for humour and for the punchline.


Well some of you asked :p


The Vim vs Emacs is a holy war amongst computer nerds. They are two different developers text editors.
It is a bit like the Amiga Vs ST wars, the Windows vs Mac wars etc etc. More humour than actual serious.
 

Join us or log in to post a reply.

To join in you must be a member of MotorhomeFun

Join MotorhomeFun

Join us, it quick and easy!

Log in

Already a member? Log in here.

Latest journal entries

Funsters who are viewing this thread

Back
Top