9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Acme tabs to spaces
@ 2005-12-06 19:06 plan9
  2005-12-06 20:37 ` Skip Tavakkolian
  0 siblings, 1 reply; 7+ messages in thread
From: plan9 @ 2005-12-06 19:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 12/6/05, Paul Lalonde <plalonde@telus.net> wrote:
> Is there some automatic tab conversion code somewhere in Acme?  Where
> would be the sane place to put such a thing?   (yes, I already know
> there is no sane place for such a thing...)

Okay, I'll ask the obvious-- why not an en- and de-tabbing file server?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Acme tabs to spaces
  2005-12-06 19:06 [9fans] Acme tabs to spaces plan9
@ 2005-12-06 20:37 ` Skip Tavakkolian
  0 siblings, 0 replies; 7+ messages in thread
From: Skip Tavakkolian @ 2005-12-06 20:37 UTC (permalink / raw)
  To: 9fans

>> Is there some automatic tab conversion code somewhere in Acme?  Where
>> would be the sane place to put such a thing?   (yes, I already know
>> there is no sane place for such a thing...)
> 
> Okay, I'll ask the obvious-- why not an en- and de-tabbing file server?

Kwel!!!  it should read emacs style headers and figure out what the
tabbing should be on reads and on writes it should reduce multiple
consecutive spaces to one,  to save space!  perhaps it could have
auto-capitalization for '\.([0-9]|man)$' files!

i'm joking of course.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Acme tabs to spaces
  2005-12-06 18:55 ` Rob Pike
@ 2005-12-06 20:25   ` David Leimbach
  0 siblings, 0 replies; 7+ messages in thread
From: David Leimbach @ 2005-12-06 20:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 12/6/05, Rob Pike <robpike@gmail.com> wrote:
> There's no code, but using -a helps a lot.  We have a two-space
> indent rule here and I hate it but I've adapted.
>
> -rob

Writing lots of C++ are we? :-)

Just a guess.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Acme tabs to spaces
  2005-12-06 18:43 Paul Lalonde
  2005-12-06 18:46 ` andrey mirtchovski
  2005-12-06 18:54 ` Russ Cox
@ 2005-12-06 18:55 ` Rob Pike
  2005-12-06 20:25   ` David Leimbach
  2 siblings, 1 reply; 7+ messages in thread
From: Rob Pike @ 2005-12-06 18:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

There's no code, but using -a helps a lot.  We have a two-space
indent rule here and I hate it but I've adapted.

-rob

On 12/6/05, Paul Lalonde <plalonde@telus.net> wrote:
> So my new employer has a coding convention that tabs don't appear in
> source, and that indent levels are 4 spaces.  Ick.  But in the
> interest of global harmony, I'm willing to adapt.  I know I can
> trivially convert the tabs to spaces at any given time, and set
> $tabstops to 4 to get the right width, but I have to do the
> conversion with each file I save.  Ick.
> Is there some automatic tab conversion code somewhere in Acme?  Where
> would be the sane place to put such a thing?   (yes, I already know
> there is no sane place for such a thing...)
>
> Paul
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Acme tabs to spaces
  2005-12-06 18:43 Paul Lalonde
  2005-12-06 18:46 ` andrey mirtchovski
@ 2005-12-06 18:54 ` Russ Cox
  2005-12-06 18:55 ` Rob Pike
  2 siblings, 0 replies; 7+ messages in thread
From: Russ Cox @ 2005-12-06 18:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> So my new employer has a coding convention that tabs don't appear in
> source, and that indent levels are 4 spaces.  Ick.  But in the
> interest of global harmony, I'm willing to adapt.  I know I can
> trivially convert the tabs to spaces at any given time, and set
> $tabstops to 4 to get the right width, but I have to do the
> conversion with each file I save.  Ick.
> Is there some automatic tab conversion code somewhere in Acme?  Where
> would be the sane place to put such a thing?   (yes, I already know
> there is no sane place for such a thing...)

acme -a goes a long way to making typing four spaces an okay
thing to do by hand.

everyone has their own programs to convert.
mine is in /n/sources/contrib/rsc/cmd/tab.c

tab -n4 converts from spaces to tabs
tab -u -n4 converts from tabs to spaces

you could go a step further and create scripts T and U
for execution in acme windows that use $winid to
pick up the window contents, process it, and put it back.

russ


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Acme tabs to spaces
  2005-12-06 18:43 Paul Lalonde
@ 2005-12-06 18:46 ` andrey mirtchovski
  2005-12-06 18:54 ` Russ Cox
  2005-12-06 18:55 ` Rob Pike
  2 siblings, 0 replies; 7+ messages in thread
From: andrey mirtchovski @ 2005-12-06 18:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

tab/untab scripts? presumably you'd like to have something that
reverses spaces to tabs when you open a file for editing.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [9fans] Acme tabs to spaces
@ 2005-12-06 18:43 Paul Lalonde
  2005-12-06 18:46 ` andrey mirtchovski
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Lalonde @ 2005-12-06 18:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

So my new employer has a coding convention that tabs don't appear in  
source, and that indent levels are 4 spaces.  Ick.  But in the  
interest of global harmony, I'm willing to adapt.  I know I can  
trivially convert the tabs to spaces at any given time, and set  
$tabstops to 4 to get the right width, but I have to do the  
conversion with each file I save.  Ick.
Is there some automatic tab conversion code somewhere in Acme?  Where  
would be the sane place to put such a thing?   (yes, I already know  
there is no sane place for such a thing...)

Paul



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-12-06 20:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06 19:06 [9fans] Acme tabs to spaces plan9
2005-12-06 20:37 ` Skip Tavakkolian
  -- strict thread matches above, loose matches on Subject: below --
2005-12-06 18:43 Paul Lalonde
2005-12-06 18:46 ` andrey mirtchovski
2005-12-06 18:54 ` Russ Cox
2005-12-06 18:55 ` Rob Pike
2005-12-06 20:25   ` David Leimbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).