Re: columns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Jan 08, 2018 at 07:24:43AM +0100, Julia Lawall wrote:
> 
> 
> On Mon, 8 Jan 2018, David Gibson wrote:
> 
> > On Sat, Jan 06, 2018 at 05:43:20PM +0100, Julia Lawall wrote:
> > > Hello,
> > >
> > > I have been working with Frank Rowand on a v7 of file and line number
> > > annotations in the -O dts output of the device tree compiler.
> > >
> > > I wanted to make an --annotate-full option that would print the full
> > > filename, and starting and ending line and column numbers.
> > >
> > > The following commit:
> > >
> > > commit 728c5e87c655c17c2fbc1d5386b12ff328e0fc76
> > > Author: David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>
> > > Date:   Tue Dec 8 14:24:42 2009 +1100
> > >
> > > extends the position mechanism with columns, but considers a tab to be 8
> > > column.  Would it be ok to drop this feature?  I have the impression that
> > > counting 1 column for a tab would be more useful for actually finding the
> > > referenced code.
> >
> > Hrm.  I set it up that way initially so that the reported columns
> > would match what shows up inside an editor (e.g. emacs
> > 'column-number-mode').
> >
> > So, I think I'll need to see a more developed case for why not
> > expanding tabs this way is preferable before making the change.
> 
> OK, my emacs doesn't show column numbers.

Its not on by default; M-x 'column-number-mode' should enable it.  I
don't actually know if it always treats tabs as 8 columns, or if
there's some magic variable controlling how it treats tabs.  Given
it's emacs, probably the latter.

Fwiw, I don't usually use vi, but I had a quick poke in vim and it
seems to show both tab-unexpanded and tab-expanded numbers for the
columns (when pressing ^G, anyway).

> I make a macro that moves
> forward one space, and run that macro, eg 28 times, which ends up in the
> wrong place.

That is a good point.

> But if you prefer tabs to count as 8, I can leave it as it
> is.

I'm no longer sure which I prefer :/

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux