Packaging a vim syntax rule with a conflicting filetype for a registered extension
James McCoy
jamessan at debian.org
Wed Nov 30 02:52:26 UTC 2011
On Tue, Nov 29, 2011 at 10:35:29PM +0100, Daniel Leidert wrote:
> I would like to ask for some support. I was asked to install the gtypist
> vim syntax highlighting together with gtypist. I had no problems to
> figure out, which files to install. Unfortunately gtypist files suffix
> is .typ which is already handled in vim filetypes.vim as an SQL file.
>
> Is there a way to handle this? I was already looking through the vim
> documentation and Google, but the only solutions I found talking about
> overruling don't work:
>
> $ cat /usr/share/vim/addons/ftdetect/gtypist_filetype.vim
> au BufRead,BufNewFile *.typ set filetype=gtypist
/usr/share/vim/addons isn't part of Vim's 'runtimepath' by default, so
that file is likely never being sourced. Vim's “:scriptnames” command
will show you whether it has been sourced.
> When I then open a .typ file `:set ft' still reports "filetype=sql". Can
> you help me please?
The package should ship a registry file, as described in the policy[0],
and then can use the vim-addons command from the vim-addon-manager
package to enable the runtime files.
I'm hoping to get some time for Wheezy to make this a bit simpler (and
more robust), but I'm not sure how that'll pan out.
[0]: http://pkg-vim.alioth.debian.org/vim-policy.html/
--
James
GPG Key: 1024D/61326D40 2003-09-02 James McCoy <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20111129/37680ad7/attachment.pgp>
More information about the pkg-vim-maintainers
mailing list