Date: Sun, 27 Jun 2004 21:26:00 +0200 From: Marc Fonvieille <blackend@FreeBSD.org> To: Joe Marcus Clarke <marcus@FreeBSD.org> Cc: doc@FreeBSD.org Subject: Re: Tidying SGML documents Message-ID: <20040627192600.GA66337@abigail.blackend.org> In-Reply-To: <1088359848.40140.5.camel@shumai.marcuscom.com> References: <1088359848.40140.5.camel@shumai.marcuscom.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Sun, Jun 27, 2004 at 02:10:48PM -0400, Joe Marcus Clarke wrote: > I figure I'd ask before trying to clean these manually. What sgml-fu do > you guys use to tidy horrendously formatted website documents? The > GNOME docs are in pretty bad shape, and I've finally gotten fed up > enough to fix them. > > I'm a vim user, and found this sometime ago: > > autocmd BufNewFile,BufRead *.sgml,*.ent,*.html,*.tex,*.xsl set > autoindent formatoptions=tcq2l textwidth=70 shiftwidth=2 softtabstop=2 > tabstop=8 > I use the same line :) > It works great for writing new documents, but I was hoping there was a > nice automatic recipe for existing documents. Thanks. > Well it's difficult to "really" clean an existing file without using a complex script. What I use to do is: - cleaning trailing spaces (with sed) - replacing leading spaces with tabs where needed (with sed) - using gq command from Vim for correct indentation etc. Most of time it gives good results but I often have to finish the job by myself... Marc [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA3x9H81T1MWxkgcoRAgM/AJ9Eo3lz7BFb2Ql6KL12rFoqCycTgACdGCxV ABV57e4lVMC/W0WKk1moBgY= =UKLp -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040627192600.GA66337>
