Date: Thu, 28 Oct 1999 23:57:44 +0200 From: Robert Brive <brive@freebsd-fr.org> To: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> Cc: freebsd-doc@freebsd.org Subject: Re: For the vim users here Message-ID: <19991028235743.B469@ppp1-cergy.isdnet.net> In-Reply-To: <19991026061250.C24278@daemon.ninth-circle.org>; from Jeroen Ruigrok/Asmodai on Tue, Oct 26, 1999 at 06:12:50AM %2B0200 References: <19991024203326.D17828@daemon.ninth-circle.org> <19991025082320.H2102@kilt.nothing-going-on.org> <19991026061250.C24278@daemon.ninth-circle.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit On Tue, Oct 26, 1999 at 06:12:50AM +0200, Jeroen Ruigrok/Asmodai wrote: > -On [19991026 00:00], Nik Clayton (nik@freebsd.org) wrote: > > [snip vim sgml edit commands] > > >Stuff like this should probably be added to > > > > (a) the Primer > > > > (b) doc/share/examples/vim, or a similar directory. > > Feel free to use it in there. Might help jumpstart new -doc people whom > for likewise reasons as me refuse to run emacs. > > -- > Jeroen Ruigrok van der Werven/Asmodai asmodai(at)wxs.nl For people working with iso-8859-1 accents, who want to work with their native representation (âà...) but stay with files in the SGML form (âà...), I suggest the following commands: " accents in SGML if !exists("autocommands_accents_sgml") let autocommands_accents_sgml = 1 " on reads, have a native representation autocmd BufReadPost,FileReadPost *.sgml,*.ent,*.html '[,']!$HOME/.vim/sgml2accents.pl autocmd BufReadPost,FileReadPost *.sgml,*.ent,*.html syn match sgmlSpecial "&[^;]*;" autocmd BufReadPost,FileReadPost *.sgml,*.ent,*.html set sts=2 "set ai sts=2 ts=8 sw=2 tw=70 (nbm@mithrandr.moria.org?) " to correct some accents (on my french keyboard) autocmd BufEnter * map! ^a â|map! ^e ê|map! ^i î|map! ^o ô|map! ^u û " on writes, have the SGML syntax autocmd BufWritePre,FileWritePre *.sgml,*.ent,*.html '[,']!$HOME/.vim/accents2sgml.pl " then go back with native accents autocmd BufWritePost,FileWritePost *.sgml,*.ent,*.html '[,']!$HOME/.vim/sgml2accents.pl endif It seems that your lines corresponds roughly to the line in comments ("set ai sts=2 ts=8 sw=2 tw=70). Any comments? -- Robert Brive <brive@mail.dotcom.fr> <brive@freebsd-fr.org> --ZPt4rx8FFjLCG7dd Content-Type: application/x-perl Content-Disposition: attachment; filename="accents2sgml.pl" Content-Transfer-Encoding: quoted-printable #!/usr/bin/perl=0Awhile (<>) {=0As/=C0/À/g;=0As/=C1/Á/g;=0As/= =C2/Â/g;=0As/=C3/Ã/g;=0As/=C4/Ä/g;=0As/=C5/Å/g;=0As= /=C5/Å/g;=0As/=C6/Æ/g;=0As/=C7/Ç/g;=0As/=C8/È'/g;= =0As/=C9/É/g;=0As/=CA/Ê/g;=0As/=CB/Ë/g;=0As/=CC/Ì/= g;=0As/=CD/Í/g;=0As/=CE/Î/g;=0As/=CF/Ï/g;=0As/=D0/Ð/g= ;=0As/=D1/Ñ/g;=0As/=D2/Ò/g;=0As/=D3/Ó/g;=0As/=D4/&Ocir= c;/g;=0As/=D5/Õ/g;=0As/=D6/Ö/g;=0As/=D7/×/g;=0As/=D8/&Osl= ash;/g;=0As/=D9/Ù/g;=0As/=DA/Ú/g;=0As/=DB/Û/g;=0As/=DC/= Ü/g;=0As/=DD/Ý/g;=0As/=DE/Þ/g;=0As/=DF/ß/g;=0As/=E0= /à/g;=0As/=E1/á/g;=0As/=E2/â/g;=0As/=E3/ã/g;=0As= /=E4/ä/g;=0As/=E5/å/g;=0As/=E5/å/g;=0As/=E6/æ/g;=0As= /=E7/ç/g;=0As/=E8/è/g;=0As/=E9/é/g;=0As/=EA/ê/g;= =0As/=EB/ë/g;=0As/=EC/ì/g;=0As/=ED/í/g;=0As/=EE/î/= g;=0As/=EF/ï/g;=0As/=F0/ð/g;=0As/=F1/ñ/g;=0As/=F2/ò/= g;=0As/=F3/ó/g;=0As/=F4/ô/g;=0As/=F5/õ/g;=0As/=F6/ö= ;/g;=0As/=F7/÷/g;=0As/=F8/ø/g;=0As/=F9/ù/g;=0As/=FA/&u= acute;/g;=0As/=FB/û/g;=0As/=FC/ü/g;=0As/=FD/ý/g;=0As/=FE/= þ/g;=0As/=FF/ÿ/g;=0Aprint;=0A}=0A --ZPt4rx8FFjLCG7dd Content-Type: application/x-perl Content-Disposition: attachment; filename="sgml2accents.pl" Content-Transfer-Encoding: quoted-printable #!/usr/bin/perl=0Awhile (<>) {=0As/À/=C0/g;=0As/Á/=C1/g;=0As/= Â/=C2/g;=0As/Ã/=C3/g;=0As/Ä/=C4/g;=0As/Å/=C5/g;=0As= /Å/=C5/g;=0As/Æ/=C6/g;=0As/Ç/=C7/g;=0As/È'/=C8/g;= =0As/É/=C9/g;=0As/Ê/=CA/g;=0As/Ë/=CB/g;=0As/Ì/=CC/= g;=0As/Í/=CD/g;=0As/Î/=CE/g;=0As/Ï/=CF/g;=0As/Ð/=D0/g= ;=0As/Ñ/=D1/g;=0As/Ò/=D2/g;=0As/Ó/=D3/g;=0As/Ô/= =D4/g;=0As/Õ/=D5/g;=0As/Ö/=D6/g;=0As/×/=D7/g;=0As/Ø= ;/=D8/g;=0As/Ù/=D9/g;=0As/Ú/=DA/g;=0As/Û/=DB/g;=0As/&Uu= ml;/=DC/g;=0As/Ý/=DD/g;=0As/Þ/=DE/g;=0As/ß/=DF/g;=0As/&a= grave;/=E0/g;=0As/á/=E1/g;=0As/â/=E2/g;=0As/ã/=E3/g;=0A= s/ä/=E4/g;=0As/å/=E5/g;=0As/å/=E5/g;=0As/æ/=E6/g;=0A= s/ç/=E7/g;=0As/è/=E8/g;=0As/é/=E9/g;=0As/ê/=EA/g= ;=0As/ë/=EB/g;=0As/ì/=EC/g;=0As/í/=ED/g;=0As/î/=EE= /g;=0As/ï/=EF/g;=0As/ð/=F0/g;=0As/ñ/=F1/g;=0As/ò/=F2= /g;=0As/ó/=F3/g;=0As/ô/=F4/g;=0As/õ/=F5/g;=0As/ö/= =F6/g;=0As/÷/=F7/g;=0As/ø/=F8/g;=0As/ù/=F9/g;=0As/&uac= ute;/=FA/g;=0As/û/=FB/g;=0As/ü/=FC/g;=0As/ý/=FD/g;=0As/&t= horn;/=FE/g;=0As/ÿ/=FF/g;=0Aprint;=0A}=0A --ZPt4rx8FFjLCG7dd-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991028235743.B469>