[Gllug] vi indenting

Paul Brazier pbrazier at cosmos-uk.co.uk
Wed Dec 19 13:48:22 UTC 2001


> I vote for hard tabs - the logic of saying "I'm indenting this one
> level, so I'm going to use one tab to do" that appeals to me. I think
> it's also easier to transform tabs to spaces where required 
> rather than going from spaces to tabs

One place tabs fall down I've found is when using it for tabular data -
because you can't set your tab stops separately for each text file you
end up using muliple tabs just to line a column up.
e.g. in /etc/fstab or something some of the first column entries are
longer than others so you have multiple tabs to line them up.

But then if you view them in an editor with a different default tab size
the columns don't line up.
Or if you wanted to import to a database table with the convention that
a single tab separates fields you get stuck.

Maybe what might be useful is a standard way of encoding tab stop
details into the top of a text file e.g. something like:
#!tabstops 8,12,16,18,20

then the editors would have to understand this and put the tab stops
accordingly.

But I suppose the thing about text files is they don't include this sort
of metadata otherwise they become word processing documents.

Also what if you wanted different tab stops for different sections of
the file?

Is it correct that using spaces is identical to using tabs with the
width set to 1?
Apart from the fact you might only use them in multiples of 2 or
something.

Just some thoughts anyway.


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the originator.

This footnote also confirms that this email message has been checked
for the presence of computer viruses.

**********************************************************************


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list