delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/10/15:22:35

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; q=dns; s=default; b=ipJaiM9FS1TKR1Q7unyvMtB33xHPH1
DXntCqDj/1heMv6xMC0H8X6YyEEcPm//J5WEZKkJkjMN3OD+BMp4RqvpPUatvR8L
9vxGDEalpM7CQa5C1JrAtcEuHe825yUEeevVlm5i2QWYzj+YYNf02XkcUlXQfiIT
bhJcQ78Bz3/yg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:references
:mime-version:content-type:content-transfer-encoding
:in-reply-to; s=default; bh=fA3JTreqD4nG5deEq/TBBDk2f9U=; b=WxAa
/mPerhmcD0tGuz6IQx4bdNEwh40T+5fUWIMPGjTDJfv/boytzd/ii8KziuYKwgQl
jC8qh+/5ppM9NVV28r//N7XytKSGjF3dZ8yZFrqht7U4XolVBqf2AHvxKXPLLzkh
+kfvjWX1jdN3wCo6a/l0zfEO/vmzqmn+LH2ds+0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: mail.spocom.com
Date: Fri, 10 Apr 2015 12:21:51 -0700
From: Gary Johnson <garyjohn AT spocom DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.35: possible backspace key and arrow keys bug
Message-ID: <20150410192151.GA13043@phoenix>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAMOkCRZ4Tdg+UoydTj+ntXyyFvbhk8ug6A+LXAG3+zOw4UfuTw AT mail DOT gmail DOT com> <20150408221622 DOT GK20741 AT dinwoodie DOT org> <CAF+j1MP-dtu66bq_kj5qQ7W7m7m64A1RvwW=Cga6-o1W2X5JUw AT mail DOT gmail DOT com> <20150409173434 DOT GC6901 AT calimero DOT vinschen DOT de> <mg6hq4$gpo$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <mg6hq4$gpo$1@ger.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
X-IsSubscribed: yes

On 2015-04-09, René Berber wrote:
> On 4/9/2015 12:34 PM, Corinna Vinschen wrote:
> > On Apr  9 09:54, Weston Turner wrote:
> >> I corroborate the original poster's experience with this issue.
> >> 
> >> Steps to reproduce the issue: for example open a file with vim 
> >> under Cygwin, press: up, up, down, down, left, left, right,
> >> right. Vim under Cygwin places:
> >> 
> >> C C D D B B A A
> >> 
> >> in the file due to the arrow keys being pressed. Vim under bash
> >> on Linux or the Mac terminal does not treat the arrow keys as
> >> file input, but rather simply uses them to move the cursor about
> >> in the file.
> > 
> > WJFFM, as on Linux, in command mode as well as in insert mode.
> 
> You probably have a .vimrc on Cygwin, and the same or /etc/vimrc on Linux.
> 
> The real question:
> 
> Why vim on Cygwin doesn't install, or use if you add one, /etc/vimrc?

Executing

    $ vim --version

shows

       system vimrc file: "$VIM/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
          user exrc file: "$HOME/.exrc"
      fall-back for $VIM: "/etc"
     f-b for $VIMRUNTIME: "/usr/share/vim/vim74"

From within vim,

    :echo $VIM

shows

    /usr/share/vim

To find out more about the value of $VIM, execute

    :help $VIM

So, Cygwin's vim looks for the system vimrc at /usr/share/vim/vimrc,
not /etc/vimrc.  If you create that file, start vim and execute

    :scriptnames

you will see

    1: /usr/share/vim/vimrc

at the top of the list.

Personally, I really like that Cygwin does not include a system
vimrc in its vim package.  If it did, I'd have to undo all those
settings or rm the file.  I have a ~/.vimrc that works on Windows,
Cygwin, Ubuntu and Fedora and ensures that vim behaves the same on
all platforms.  I don't want somebody else making those
configuration decisions for me.

> On Linux I have one with the following contents (which fixes the
> thread problem):
> 
> " Begin /etc/vimrc
> 
> set nocompatible
> set backspace=2
> syntax on
> set background=dark
> if (&term == "iterm") || (&term == "putty")
>   set background=dark
> endif
> 
> " End /etc/vimrc
> 
> The 5th line doesn't work with the version installed on Cygwin, so you
> have to comment it; but it would be nice to also have syntax highlighting.

I don't understand what you mean that the 5th line doesn't work and
has to be commented.  I have "syntax on" in my ~/.vimrc file and
syntax highlighting works just fine.  I have "set background=light"
in my colorscheme file and it works fine as well.  Further, I can
execute ":set background=dark" and ":set background=light" from the
vim command line and see the color differences.

It sounds like some part of your installation is broken.

I'm using Cygwin's vim 7.4.663-1.

Regards,
Gary


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

- Raw text -


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