* vim yellow lines problem
@ 2018-10-09 8:50 Tapas Mishra
2018-10-09 11:33 ` James Darnley
0 siblings, 1 reply; 3+ messages in thread
From: Tapas Mishra @ 2018-10-09 8:50 UTC (permalink / raw)
To: cygwin
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,
--------
Thanks
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vim yellow lines problem
2018-10-09 8:50 vim yellow lines problem Tapas Mishra
@ 2018-10-09 11:33 ` James Darnley
2018-10-09 17:41 ` Greywolf
0 siblings, 1 reply; 3+ messages in thread
From: James Darnley @ 2018-10-09 11:33 UTC (permalink / raw)
To: cygwin
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.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vim yellow lines problem
2018-10-09 11:33 ` James Darnley
@ 2018-10-09 17:41 ` Greywolf
0 siblings, 0 replies; 3+ messages in thread
From: Greywolf @ 2018-10-09 17:41 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-09 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 8:50 vim yellow lines problem Tapas Mishra
2018-10-09 11:33 ` James Darnley
2018-10-09 17:41 ` Greywolf
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).