delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/10/09/13:41:31

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=UX5hvUO9R2oTz3vE
En06lWIIQcQatHzW5pSDDC4RW/9tAgTlOuhc0zu9rnjWl/6r1qW5NLWdHVHiy60J
tGRQvt7Oxpt72trQCFIIDykvt9kATXLvnNwH5D64Oxi9/WuZVsqknJ0DXiuzPdfC
nUusZBGC19VEKn9k4r74jVitGSg=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=I+BESMEpJl/CrN8fq09QFp
badi4=; b=qCfK4Ao1ysTYIsWdWVc2rZg9SIALSRQqvIJ5540QE/mFOpo1w0YBNl
kTGJ0VhbRgSuo1Sam2C1IBFu0S2vFRl8q9DeudkZH01WcpFI4jDeWA7ncpqZ3SNb
P2q23vlyE2UPm2fGKXAG25xGT0Ggia+nIl2ORiSeF0jPdfko0VqNw=
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-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:jpg, accomplish, burst
X-HELO: eddie.starwolf.com
Subject: Re: vim yellow lines problem
To: cygwin AT cygwin DOT com
References: <CAPhqJV2YwqcjcCXpVE-gauAq7tqec970ut23DOVLw16KF0bKPQ AT mail DOT gmail DOT com> <336fc452-2081-66d8-47ad-a4325ddd835e AT gmail DOT com>
From: Greywolf <greywolf AT starwolf DOT com>
Message-ID: <f3cabe55-4814-ab11-4c0a-406c3817866d@starwolf.com>
Date: Tue, 9 Oct 2018 10:41:10 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <336fc452-2081-66d8-47ad-a4325ddd835e@gmail.com>
X-IsSubscribed: yes

On 10/9/2018 4:33, James Darnley wrote:
> On 2018-10-09 10:49, Tapas Mishra wrote:
>> I had a C program which I copy pasted and there were line numbers in code.
>> So I replaced line numbers in vi by following command
>> :%s/\d*.  (<-- last of * is a dot)
>>
>> Now I am opening vim in cygwin then all typed lines are coming yellow.
>> https://i.stack.imgur.com/Dxd8h.jpg
>>
>> How do I fix this problem,
> 
> :noh or :nohlsearch
> 
> It looks like it is highlighting the matches of the last search you made
> which was "digit class, 0 or more, and any char".
> 
> I would not expect Vim to highlight on opening a new file though, only
> when you tell it to search.

1. Vim remembers your last search and acts accordingly, even on a new file.

2. What you are searching for is 'zero or more matches of a digit 
followed by any character', i.e. 'anything', so it gets highlighted.

My usual trick to accomplish this is to type /aseldkfja/, where
"aseldkfja" is any short burst of random typing, and then hit return.
Your screen should return to normal.

> 
> 
> --
> 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
> 


--
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