Bug#942224: asymptote: VIM addon cannot be managed with vim-addons and fails to enable syntax highlighting
Package: asymptote
Version: 2.53-1
Severity: normal
Tags: patch
Hello,
thanks for maintaining Asymptote in Debian!
I am giving it a try, but I wanted to see syntax highlighting in VIM.
It seems to me that a VIM addon is shipped in the package:
$ dpkg -L asymptote | grep vim
/usr/share/vim
/usr/share/vim/addons
/usr/share/vim/addons/ftdetect
/usr/share/vim/addons/ftdetect/asy_filetype.vim
/usr/share/vim/addons/ftplugin
/usr/share/vim/addons/ftplugin/asy.vim
But there seem to be two issues: there's no registry file (hence
vim-addons does not find the addon and cannot manage it) and
the syntax file is placed in ftplugin/ (which looks wrong to me).
In order to enable VIM support for Asymptote I had to prepare
the following file:
$ cat asymptote.yaml
addon: asymptote
description: "easier editing of Asymptote .asy files"
files:
- syntax/asy.vim
- ftdetect/asy_filetype.vim
and to issue the following commands (as root):
# mv /usr/share/vim/addons/ftplugin/asy.vim /usr/share/vim/addons/syntax/
# cp asymptote.yaml /usr/share/vim/registry/
# chown root:root /usr/share/vim/registry/asymptote.yaml
# chmod 644 /usr/share/vim/registry/asymptote.yaml
After, I was finally able to manage the addon for my regular user
with:
$ vim-addons install asymptote
which automatically set up the following symlinks:
~/.vim/syntax/asy.vim -> /usr/share/vim/addons/syntax/asy.vim
~/.vim/ftdetect/asy_filetype.vim -> /usr/share/vim/addons/ftdetect/asy_filetype.vim
Now, when I open a .asy file, VIM automatically enables the appropriate
syntax highlighting.
Please add file asymptote.yaml to package asymptote (so that it
is installed to /usr/share/vim/registry/asymptote.yaml )
and change file debian/asymptote.install so that file asy.vim
is installed to /usr/share/vim/addons/syntax/ (and not to
ftplugin/ ...).
Thanks for your time!
Bye.
-- System Information:
Debian Release: bullseye/sid
APT prefers testing
APT policy: (800, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages asymptote depends on:
ii freeglut3 2.8.1-3+b1
ii ghostscript 9.27~dfsg-3.1
ii imagemagick 8:6.9.10.23+dfsg-2.1+b1
ii imagemagick-6.q16 [imagemagick] 8:6.9.10.23+dfsg-2.1+b1
ii install-info 6.6.0.dfsg.1-2
ii libc6 2.29-2
ii libfftw3-double3 3.3.8-2
ii libgc1c2 1:7.6.4-0.4
ii libgcc1 1:9.2.1-8
ii libgl1 1.1.0-1+b1
ii libglew2.1 2.1.0-4+b1
ii libgsl23 2.5+dfsg-6+b1
ii libreadline8 8.0-3
ii libsigsegv2 2.12-2
ii libstdc++6 9.2.1-8
ii libtinfo6 6.1+20190803-1
ii python3 3.7.5-1
ii tex-common 6.12
ii texlive-binaries 2019.20190605.51237-3
ii texlive-latex-base 2019.20190930-1
ii texlive-plain-generic 2019.20190930-2
ii texlive-pstricks 2019.20190930-2
ii xdg-utils 1.1.3-1
ii zlib1g 1:1.2.11.dfsg-1+b1
Versions of packages asymptote recommends:
ii asymptote-doc 2.53-1
Versions of packages asymptote suggests:
ii asymptote-x11 2.53-1
-- no debconf information
Reply to: