filetype.vim
Pierre Habouzit
pierre.habouzit@m4x.org
Wed, 16 Mar 2005 12:37:43 +0100
--nextPart1353150.skCNoHKE3U
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Le Mer 16 Mars 2005 12:32, Bram Moolenaar a =E9crit :
> Pierre -
>
> > please consider the attached patch. it adds files
> > changelog.Debian.gz to the debchangelog type, since the later check
> > (that tries to know if the getline(1) has an urgency in it) seems
> > to fail, I guess because it is gzipped.
> >
> > with that simple patch, the detection is correct.
>
> This should not be required. The gzip.vim plugin, which makes it
> possible to edit .gz files, already takes care of it for all types of
> file. Is there something wrong with your gzip.vim?
>
> - Bram
I only use pristine gzip.vim
the thing is, the line to detect debchangelog are here :
(quoting /usr/share/vim/vim63/filetype.vim)
" Changelog
au BufNewFile,BufRead changelog.Debian,changelog.dch setf debchangelog
au BufNewFile,BufRead [cC]hange[lL]og if getline(1) =3D~ '; urgen=
cy=3D'
\| setf debchangelog | else | setf changelog | endif
[... later ...]
" Changelog
au BufNewFile,BufRead [cC]hange[lL]og* if getline(1) =3D~ '; urgen=
cy=3D'
\| setf debchangelog | else | setf changelog | endif
but when I open any /usr/share/doc/*/changelog.Debian.gz .. filetype is set=
to changelog.
and some further tests show me that the second block I quoted is used to
determine the filetype, but that the wrong decision is taken.
I made my tests on /usr/share/doc/vim/changelog.Debian.gz ;)
and the first line is :
vim (1:6.3-064+1) unstable; urgency=3Dlow
that should really match '; urgency=3D'
I made further testing : gunziping the file + rename it into changelog.toto
(in order to trigger only the second bloc) results into the good guess.
that's why I pretend it is gzip related
I can provide you some debchangelog if you don't have any,=20
cheers
=2D-=20
=B7O=B7 Pierre Habouzit
=B7=B7O
OOO http://www.madism.org
--nextPart1353150.skCNoHKE3U
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQBCOBqIvGr7W6HudhwRArt+AJ0QToaL4IQDfM0Z8YkSaKCbjoYn4QCfbLyC
QkcLsNX2ZNTu1fj9zex5LxY=
=ZmH+
-----END PGP SIGNATURE-----
--nextPart1353150.skCNoHKE3U--