Ah...got more reading. `expand` is smarter than I have thought ( I
misunderstood it as only fixed space characters can be provided to replace
tabs), so to keep the source file looks the same as it used to be. This should
be enough to:

$ cat /tmp/tabfile | while read fn ; do expand $fn > /tmp/no_initabfile; mv 
/tmp/no_initabfile $fn; done

Then removing trailing spaces.

Is that the correct way?

Best regards,
Yifan

On Wed, Jan 05, 2011 at 02:19:00AM -0700, Tor Lillqvist wrote:
> > Would you also like to comment my updated method sent yesterday? Thanks!
> 
> Well, it was not clear to me why you want to expand only initial tabs. 
> Presumably when somebody uses tab characters in a source file, they intend 
> them to tab to the next multiple of four columns regardless where on the line 
> they are? That is how the editor shows the source files to the person editing 
> it. Or am I missing something?
> 
> --tml
> 
> 
> _______________________________________________
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to