Hi,
Within TM's status bar you find 'Line: xx Column: xx'
If I use e.g. Tab Size: 4 and 'No Soft Tab' the column counter only works for TABs from the beginning of a line but not for TABs within a line.
Example:
I have the following line (numbers := column counter):
TAB TAB TAB Hallo | | | | | | | -13 | | -9 | -5 -1
OK, but
TAB TAB TAB HalloTAB World | | | | | | | | | -21!!! (it should be 22!!) | | | | | | | -13 | | -9 | -5 -1
The same also for 'Hallo TAB World'.
Please note: 'TAB ' means '\t' but easier to count.
Or am I completely wrong???
I'm using Cutting Edge TM 1.5.4 (1324)
Best, Hans
On 6 Nov 2006, at 13:38, Allan Odgaard wrote:
On 6. Nov 2006, at 13:18, Hans-Joerg Bibiko wrote:
TAB TAB TAB HalloTAB World | | | | | | | | | -21!!! (it should be 22!!)
No, it should be 21:
% echo -n 'A'|expand -t4|wc -c 1 % echo -n '\t\t\tHello\tW'|expand -t4|wc -c 21
Please forgive me, but my opinion this is wrong!!!
Example: (a TAB is XXXX := Tab Size=4)
\t\t\tHello\tW written as an array beginning at index 1:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 X X X X X X X X X X X X H e l l o X X X X W | | | | | | | | | | | ---TAB---- ---TAB---- ---TAB---- --Hello------ ---TAB---- W
If % echo -en '\t\t\tHello\tW'|expand -t4|wc -c is right then the 4th TAB is count only as 3 spaces plus \t !
Cheers,
Hans
On 6. Nov 2006, at 13:56, Hans-Joerg Bibiko wrote:
[...] Please forgive me, but my opinion this is wrong!!!
[...] the 4th TAB is count only as 3 spaces plus \t !
Yes, that is the idea with tabs, they are not a fixed number of spaces, they just move to the next tab stop (and there is such at every 4th column, when the tab size is 4).
[...] Please forgive me, but my opinion this is wrong!!!
[...] the 4th TAB is count only as 3 spaces plus \t !
Yes, that is the idea with tabs, they are not a fixed number of spaces, they just move to the next tab stop (and there is such at every 4th column, when the tab size is 4).
Oh, Oh! I was completely wrong. Sorry for bothering you!!!!! Of course, 'Hell' counts as a 'TAB' and 'o' + 3 == TAB_SIZE ....
Sorry, I was completely off the track ;)
Hans