• Bug#1103772: Provide vimdiff alternative

    From martin f krafft@21:1/5 to All on Mon Apr 21 14:40:01 2025
    Package: neovim
    Version: 0.10.4-8
    Severity: normal
    Tags: patch

    Trying to run `vimdiff` after setting up Neovim, I find it using
    `vim.nox`, and Neovim is not set up to provide a vimdiff
    alternative:

    update-alternatives: error: alternative /usr/bin/nvim for vimdiff not registered; not setting

    All that's needed is this in `postinst`:

    ```
    update-alternatives --install /usr/bin/vimdiff vimdiff /usr/libexec/neovim/vimdiff 40
    ```

    and it works.


    -- System Information:
    Debian Release: trixie/sid
    APT prefers unstable
    APT policy: (500, 'unstable'), (1, 'experimental')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.22-amd64 (SMP w/32 CPU threads; PREEMPT)
    Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages neovim depends on:
    ii libc6 2.41-7
    ii libluajit-5.1-2 2.1.0+openresty20250117-2
    ii libmsgpack-c2 6.0.1-3+b1
    ii libtree-sitter0.22 0.22.6-6
    ii libunibilium4 2.1.1-2+b1
    ii libuv1t64 1.50.0-2
    ii libvterm0 0.3.3-3+b1
    ii lua-lpeg 1.1.0-2
    ii lua-luv 1.48.0-2-3
    ii neovim-runtime 0.10.4-8

    Versions of packages neovim recommends:
    ii python3-pynvim 0.5.2-2
    ii xclip 0.13-4
    ii xxd 2:9.1.1230-1

    Versions of packages neovim suggests:
    pn ctags <none>
    ii vim-scripts 20210124.4

    -- no debconf information


    --
    .''`. martin f. krafft <madduck@d.o>
    : :' : proud Debian developer
    `. `'` http://people.debian.org/~madduck
    `- Debian - when you have better things to do than fixing systems

    <!DOCTYPE html>

    <html>
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    </head>
    <body style="font-family: Lato, Calibri, Tahoma, sans-serif; max-width: 32em"> <p style="text-align: justify; text-justify: auto">Package: neovim<br/> Version: 0.10.4-8<br/>
    Severity: normal<br/>
    Tags: patch</p>
    <p style="text-align: justify; text-justify: auto">Trying to run <code>vimdiff</code> after setting up Neovim, I find it using <code>vim.nox</code>, and Neovim is not set up to provide a vimdiff alternative:</p>
    <blockquote style="padding: 0 0.5em; margin: 0; font-style: italic; border-left: 2px solid #666">
    <p style="text-align: justify; text-justify: auto">update-alternatives: error: alternative /usr/bin/nvim for vimdiff not registered; not setting</p>
    </blockquote>
    <p style="text-align: justify; text-justify: auto">All that&rsquo;s needed is this in <code>postinst</code>:</p>
    <div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span></span><code>update-alternatives --install /usr/bin/vimdiff vimdiff
    /usr/libexec/neovim/vimdiff 40
    </code></pre></div>
    <p style="text-align: justify; text-justify: auto">and it works.</p>
    <p style="text-align: justify; text-justify: auto">&ndash; System Information:<br/>
    Debian Release: trixie/sid<br/>
    APT prefers unstable<br/>
    APT policy: (500, &lsquo;unstable&rsquo;), (1, &lsquo;experimental&rsquo;)<br/>
    Architecture: amd64 (x86_64)</p>
    <p style="text-align: justify; text-justify: auto">Kernel: Linux 6.12.22-amd64 (SMP w/32 CPU threads; PREEMPT)<br/>
    Locale: LANG=en_NZ, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ:en<br/>
    Shell: /bin/sh linked to /usr/bin/dash<br/>
    Init: systemd (via /run/systemd/system)<br/>
    LSM: AppArmor: enabled</p>
    <p style="text-align: justify; text-justify: auto">Versions of packages neovim depends on:<br/>
    ii libc6 2.41-7<br/>
    ii libluajit-5.1-2 2.1.0+openresty20250117-2<br/>
    ii libmsgpack-c2 6.0.1-3+b1<br/>
    ii libtree-sitter0.22 0.22.6-6<br/>
    ii libunibilium4 2.1.1-2+b1<br/>
    ii libuv1t64 1.50.0-2<br/>
    ii libvterm0 0.3.3-3+b1<br/>
    ii lua-lpeg 1.1.0-2<br/>
    ii lua-luv 1.48.0-2-3<br/>
    ii neovim-runtime 0.10.4-8</p>
    <p style="text-align: justify; text-justify: auto">Versions of packages neovim recommends:<br/>
    ii python3-pynvim 0.5.2-2<br/>
    ii xclip 0.13-4<br/>
    ii xxd 2:9.1.1230-1</p>
    <p style="text-align: justify; text-justify: auto">Versions of packages neovim suggests:<br/>
    pn ctags <none><br/>
    ii vim-scripts 20210124.4</none></p>
    <p style="text-align: justify; text-justify: auto">&ndash; no debconf information</p>
    <div id="signature" style="font-family: Lato, Calibri, Tahoma, sans-serif; max-width: 32em"><span class="sig_separator" style="display: none">-- </span>

    <dt>.&rsquo;&lsquo;`. martin f. krafft <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#109;&#97;&#100;&#100;&#117;&#99;&#107;&#64;&#100;&#46;&#111;">&#109;&#97;&#100;&#100;&#117;&#99;&#107;&#64;&#100;&#46;&#111;</a></dt>
    <dd>:&rsquo; : proud Debian developer<br/> <code>.</code>&lsquo;<code>http://people.debian.org/~madduck</code>- Debian - when you have better things to do than fixing systems</dd>
    </dl>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)