[PD-dev] Pd code formatter?

Jamie Bullock jamie at postlude.co.uk
Fri Sep 28 13:24:13 CEST 2007


On Wed, 2007-09-26 at 22:33 +0200, Frank Barknecht wrote:
> Hallo,
> Tim Blechmann hat gesagt: // Tim Blechmann wrote:
> 
> > > Ah, ok, I didn't notice the switch.  I've originally used the default  
> > > Emacs settings for the indent. Now I think I now use stroustrup,  
> > > because it was the closest to Miller's style that I found.
> > 
> > i generally avoid tabs in my source files with the following
> > before-save-hook:
> 
> In vim it's called "set expandtab" in .vimrc

I *think* to get what Miller describes, the full vim settings would be:

set tabstop=8 
set softtabstop=4 
set shiftwidth=4
set smarttab 
set expandtab 

If anyone wants to impose a formatting 'standard' on the Pd sources, why
not just include the relevant editor commands at the bottom of the
sources:

/* vim: ts=8 sts=4 sw=4 st et */
/* -*- Mode: C; c-basic-offset: 4 -*- */

...or whatever the right commands happen to be. I know not everyone uses
vim or emacs, but this seems a useful way to indicate coding style.

Jamie

-- 
www.postlude.co.uk





More information about the Pd-dev mailing list