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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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>
[-- Attachment #2 --]
#!/usr/bin/perl
while (<>) {
s/À/À/g;
s/Á/Á/g;
s/Â/Â/g;
s/Ã/Ã/g;
s/Ä/Ä/g;
s/Å/Å/g;
s/Å/Å/g;
s/Æ/Æ/g;
s/Ç/Ç/g;
s/È/È'/g;
s/É/É/g;
s/Ê/Ê/g;
s/Ë/Ë/g;
s/Ì/Ì/g;
s/Í/Í/g;
s/Î/Î/g;
s/Ï/Ï/g;
s/Ð/Ð/g;
s/Ñ/Ñ/g;
s/Ò/Ò/g;
s/Ó/Ó/g;
s/Ô/Ô/g;
s/Õ/Õ/g;
s/Ö/Ö/g;
s/×/×/g;
s/Ø/Ø/g;
s/Ù/Ù/g;
s/Ú/Ú/g;
s/Û/Û/g;
s/Ü/Ü/g;
s/Ý/Ý/g;
s/Þ/Þ/g;
s/ß/ß/g;
s/à/à/g;
s/á/á/g;
s/â/â/g;
s/ã/ã/g;
s/ä/ä/g;
s/å/å/g;
s/å/å/g;
s/æ/æ/g;
s/ç/ç/g;
s/è/è/g;
s/é/é/g;
s/ê/ê/g;
s/ë/ë/g;
s/ì/ì/g;
s/í/í/g;
s/î/î/g;
s/ï/ï/g;
s/ð/ð/g;
s/ñ/ñ/g;
s/ò/ò/g;
s/ó/ó/g;
s/ô/ô/g;
s/õ/õ/g;
s/ö/ö/g;
s/÷/÷/g;
s/ø/ø/g;
s/ù/ù/g;
s/ú/ú/g;
s/û/û/g;
s/ü/ü/g;
s/ý/ý/g;
s/þ/þ/g;
s/ÿ/ÿ/g;
print;
}
[-- Attachment #3 --]
#!/usr/bin/perl
while (<>) {
s/À/À/g;
s/Á/Á/g;
s/Â/Â/g;
s/Ã/Ã/g;
s/Ä/Ä/g;
s/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