vim-minimal: vi invocation causes filetype.vim error - Issue and Proposed Fix

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Sat Jun 28 16:06:04 GMT 2025


On 2025-06-28 00:38, Yasutaka ATARASHI via Cygwin-apps wrote:
> When invoking `vi` with the `vim-minimal` package, an error related to
> `filetype.vim` occurs, as detailed in this issue report:
> https://github.com/vim/vim/issues/17039 (Please note: I only commented
> on this issue, I did not open it).
> 
> The problem stems from the line `filetype plugin on` in `/etc/virc`,
> which is generated from `/etc/defaults/etc/virc` during setup. The
> `filetype` plugin requires the `eval` feature, which is currently
> disabled in `vim-minimal`.
> 
> I believe this `virc` file originates from Fedora, as evidenced by the
> inclusion of `fedora/virc` in `vim.cygport`’s `SRC_URI`.
> 
> The issue appears to be resolved in the latest Fedora version (see:
> https://src.fedoraproject.org/rpms/vim/c/36cadcf4bf451f59b0d06e6cb9aa2b2e3ca7ef54?branch=rawhide
> ), but this fix hasn't been reflected in the current Cygwin package.

Patched in the f33 branch 3 years ago.

> Applying the diff from the linked Fedora commit and re-packaging
> `vim-minimal` should resolve the problem.

Or upgrading the fedora submodule vim repo to f33-f42/main/rawhide branches to 
pick up the updated virc, or downloaded from

	https://src.fedoraproject.org/rpms/vim/raw/f33/f/virc

> It would be beneficial to include a note in the package update
> documentation. A fresh installation will automatically include the
> fix, but existing installations won’t be updated unless the
> `/etc/virc` file is manually edited.

Package vim-minimal should have the parts of vim-common postinstall and 
preremove vim.sh scripts dealing with virc (which is not packaged in vim-common) 
moved into its own vim-minimal postinstall and preremove scripts.

These vim.sh scripts install virc (and vimrc) from defaults if each does not 
exist and remove installed virc (and vimrc) if each has not changed from that 
installed from defaults.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin-apps mailing list