[Harbour] Source code formatter

Szakáts Viktor harbour.01 at syenar.hu
Fri May 22 05:39:41 EDT 2009


>   for a long time I used Click to format prgs, but last time I get  
> some problems with it and became to look for something other. The  
> only one I've found is xMate, but it isn't convenient for me,  
> because it doesn't include formatter as a standalone utility and to  
> format a file, I need to create a project, add this file and open it  
> with an editor. Besides, it have too few options and I can't format  
> prg in a way I like.
>   That's why week ago I've decided to wright the formatter myself  
> and now I get it with the basic functionality, which is enough for me.

Yesterday I was thinking of committing a recently written
reindentor :) Not a full blown formatter (like my tool 'DST'
was trying to be, written 17 years ago), but it can change
indentation (including continued lines), it assumes a properly
and consistently indented source, autodetects it and can
change this to any number of chars or tabs.

>   If nobody has objection, I'll upload it to the utils/ directory.  
> Could someone prompt me how to add new directory and files in it ( I  
> never did it with SVN ) ?

Adding dir: svn add <dir>
then see doc/howtosvn.txt how to add files and svn props in particular.

Do you think we can make the default setup to produce
std Harbour .prg formatting? If it goes to utils, I think
this would be nice and expected.

Brgds,
Viktor



More information about the Harbour mailing list