From: Greywolf <greywolf@starwolf.com>
To: cygwin@cygwin.com
Subject: Re: vim yellow lines problem
Date: Tue, 09 Oct 2018 17:41:00 -0000 [thread overview]
Message-ID: <f3cabe55-4814-ab11-4c0a-406c3817866d@starwolf.com> (raw)
In-Reply-To: <336fc452-2081-66d8-47ad-a4325ddd835e@gmail.com>
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
prev parent reply other threads:[~2018-10-09 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 8:50 Tapas Mishra
2018-10-09 11:33 ` James Darnley
2018-10-09 17:41 ` Greywolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3cabe55-4814-ab11-4c0a-406c3817866d@starwolf.com \
--to=greywolf@starwolf.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).