www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/05/31/11:37:15

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 54VFbFfM1768872
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 54VFbFfM1768872
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=PKu/0v2i
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C4EA38560A3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1748705834;
bh=vip2I4XCidYEnTRvnxM2A6L2rsnVeRC0zL7YVbOVPRE=;
h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=PKu/0v2iqq7iS4QGb4cDklaLQrSo1wTXyUs2XO5+/93ofBG5eGUr+sRD4ZUFfoV3z
vGzHFtFE/N2Tq2xxfKHP9wNGE5hTuEYQExM1J9LUWk2HAZ37XCOdSCO0ecKvTQuL4T
dAT6yenM+JmRIbfZEUnih5AJXkmp2T32rE64X68E=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9510D3857013
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9510D3857013
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748705808; cv=none;
b=icKwdP2VgMTu5oWaTh3H4Xtno0rA49oqprkFOuchgvoheHRPu3uT35RAKs3h9VzMpqR/mo/JT2LKFwpPY9z1zz9nN4uCj/7rx6SCCbH1fTyLhuRlq5JMglPltpKfAD4AqUCkM7ko8VLgSPWbJ3IQtPuCDFs72tWyn2AAXrOtKVE=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1748705808; c=relaxed/simple;
bh=vaQM5mCv8MEi7Zp+mhIk9C/fW7kJWh59QBXBAhTREeg=;
h=DKIM-Signature:To:Subject:From:MIME-Version:Message-Id:Date;
b=pW4g3LbE6WsdrSGunTHDIaliEKov0n1eP7FBcuODYTxINR2KfNkdbLSZiagU5jw/qgX9Gazofb32rzXRhmfTkGipPowdigKsj6oGZb663qXAcSpW8kyFsN8bM0vbBIUriUtYK8xiGr4UVqkzD1yQ2NgPVYLcn2dbdO6WPio2000=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9510D3857013
DKIM-Filter: OpenDKIM Filter v2.11.0 send2.erinn.biz 45B0280C02CD
To: cygwin AT cygwin DOT com
Subject: Cygwin package vim breaks the command 'view'
X-Mailer: InstAddr (Block this user:
https://m.kuku.lu/u.php?t=Y3lnd2luQGN5Z3dpbi5jb20%3D&f=YW5ka2luNzczQGZhbmNsdWIucG0%3D&h=289f0aace9d700ac87e6e620ad2fbf5e&c=1)
X-Report-Abuse: <mailto:abuse+1748705805-010323ad4e08a94be8d815d16e7ca644__andkin773____fanclub DOT pm AT kuku DOT lu>
X-Report-Abuse-Inquiry: https://magical.kuku.lu/page.contact.php?type=MailNow
X-ServerTime: Sun, 01 Jun 2025 00:36:45 +0900 (JST)
MIME-Version: 1.0
Message-Id: <1748705805-010323ad4e08a94be8d815d16e7ca644__andkin773@fanclub.pm>
Date: Sun, 1 Jun 2025 00:36:45 +0900 (JST)
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: andkin773--- via Cygwin <cygwin AT cygwin DOT com>
Reply-To: andkin773 AT fanclub DOT pm
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi,

I think I found a problem in the Cygwin package vim.
The same symptom has been reported earlier to both vim and Cygwin, but I think the problem has not yet been found.
https://sourceware.org/pipermail/cygwin/2025-January/257202.html
https://github.com/vim/vim/issues/17039


REPRODUCTION:
1. Install Cygwin and add package vim. I have:
  $ cygcheck -c | grep vim
  vim                  9.1.1054-1                   OK
  vim-common           9.1.1054-1                   OK
  vim-doc              9.1.1054-1                   OK
  vim-minimal          9.1.1054-1                   OK

2. Run 'view'. this gives many errors:
  $ view
  Error detected while processing /usr/share/vim/vim91/filetype.vim:
  line   11:
  E319: Sorry, the command is not available in this version: let did_load_filetypes = 1
  line   14:
  E319: Sorry, the command is not available in this version: let s:cpo_save = &cpo
  line   48:
  E319: Sorry, the command is not available in this version: func s:StarSetf(ft)
etc.


PROBLEM:
Package vim-minimal installs 'tiny' vim and some symlinks:
  usr/bin/ex -> vi.exe
  usr/bin/rvi -> vi.exe
  usr/bin/rview -> vi.exe
  usr/bin/vi.exe
  usr/bin/view -> vi.exe

Package vim and vim-common install 'huge' vim and filetype.vim:
  /usr/share/vim/vim91/filetype.vim
Tiny vim will attempt to read this file, but it has no builtin support for it.

Perhaps an ideal solution would make tiny vim start without errors, but I don't see how that is feasible.
I don't want to uninstall vim-minimal because it is a default package for Cygwin.
Also, I think it would not solve the problem, it would just remove the commands ex, rvi, rview, view.


Package 'vim' hides tiny 'vi' with with an alias to run vim instead:
  $ cat /etc/profile.d/vim.sh
  if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
    # for bash and zsh, only if no alias is already set
    alias vi >/dev/null 2>&1 || alias vi=vim
  fi

However, there are no aliases for ex, rvi, rview, view.
These commands will still run tiny vim and report errors about filetype.vim.
  $ view --version | grep " Features included"
  Tiny version without GUI.  Features included (+) or not (-):


PROPOSED SOLUTION:
Package vim should provide aliases for ex, rvi, rview, view in /etc/profile.d/vim.sh:
  if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
    # for bash and zsh, only if no alias is already set
    alias vi >/dev/null 2>&1 || alias vi=vim

    alias ex    >/dev/null 2>&1 || alias ex=vim -e
    alias rvi   >/dev/null 2>&1 || alias rvi=vim -Z
    alias rview >/dev/null 2>&1 || alias rview=vim -RZ
    alias view  >/dev/null 2>&1 || alias view=vim -R
  fi

(See :help vim-arguments)
Also update and vim.csh and vim.fish.


WORKAROUND:
I temporarily added these aliase to my .bashrc.


Regards,
Coen


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019