Help can anybody tell me my search string background color need to be change

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Help can anybody tell me my search string background color need to be change

Kunal Chauhan
hi team,

I search text and then press shift * but the string is not properly highlighted the background color I want to change.


Thanks
kunal 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/85dafc60-c0f1-464a-b342-5eaec9c2baf1%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Tim Chase
On 2020-04-27 04:00, Kunal Chauhan wrote:
> I search text and then press shift * but the string is not properly
> highlighted the background color I want to change.

I'm not sure which colorscheme you're using, but I created my own
(based on an existing one) and set the colors I wanted in it. So you
would have something like

  hi Search term=reverse ctermbg=yellow ctermfg=black guibg=yellow guifgi=black

adjusting your colors as you see fit (I believe the default is
black-on-yellow).

-tim





--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427071712.0253336c%40bigbox.attlocal.net.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Kunal Chauhan
Hi  tim,

It is not working for me. 
this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black guibg=yellow guifgi=black  " iillegal argument last one argument I corrected 
but still it is not working no change on my vim editor.
 1.I am using mobax term and under which I am using vim.
2. my vim background color is black and foreground text is white.
3. I search the text , then cursor come on text found and then press shift +*  but it did not highligh the whole word only first character is highlighted.


On Mon, Apr 27, 2020 at 5:47 PM Tim Chase <[hidden email]> wrote:
On 2020-04-27 04:00, Kunal Chauhan wrote:
> I search text and then press shift * but the string is not properly
> highlighted the background color I want to change.

I'm not sure which colorscheme you're using, but I created my own
(based on an existing one) and set the colors I wanted in it. So you
would have something like

  hi Search term=reverse ctermbg=yellow ctermfg=black guibg=yellow guifgi=black

adjusting your colors as you see fit (I believe the default is
black-on-yellow).

-tim







--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc0BO40hJ2K2LXPvDA8uUBQ41hxENpwaMFK%2B_y6aMkUZuw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Tony Mechelynck
On Mon, Apr 27, 2020 at 3:15 PM Kunal Chauhan <[hidden email]> wrote:
>
> Hi  tim,
>
> It is not working for me.
> this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black guibg=yellow guifgi=black  " iillegal argument last one argument I corrected
> but still it is not working no change on my vim editor.
>  1.I am using mobax term and under which I am using vim.
> 2. my vim background color is black and foreground text is white.
> 3. I search the text , then cursor come on text found and then press shift +*  but it did not highligh the whole word only first character is highlighted.

There are two highlight settings which might be involved: one (Search)
for all matches for the latest pattern, and another one (IncSearch)
for the next match for the pattern you are typing between hitting / or
? and the corresponding <Enter>. To see how they are set on your Vim,
and where (if anywhere) those settings were defined, use

        :verbose exe "hi Search" | hi IncSearch

When I do this after starting "vim -u DEFAULTS", the answer (in Vim 8.2.646) is

        Search         xxx term=reverse ctermbg=11 guibg=Yellow
        IncSearch      xxx term=reverse cterm=reverse gui=reverse

With my usual vimrc and my homemade colorscheme the answer in gvim is

        Search         xxx term=reverse ctermfg=0 ctermbg=14 guibg=Yellow
                Last set from ~/.vim/colors/almost-default.vim line 22
        IncSearch      xxx term=reverse cterm=reverse gui=reverse
                Last set from ~/.vim/colors/almost-default.vim line 22

In both cases both search-related highlights are set the way I want them to be.

See also
        :help :colorscheme
        :view $VIMRUNTIME/colors/README.txt
        :help :highlight (which is two long sections, numbered 13 and
14 in that helpfile)

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXs-YdZr2xU5QvYGw5gFXHTFPrARk7rqEXQW_CNTxG5tfA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Gary Johnson-4
In reply to this post by Kunal Chauhan
On 2020-04-27, Kunal Chauhan wrote:

> Hi  tim,
>
> It is not working for me. 
> this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black guibg
> =yellow guifgi=black  " iillegal argument last one argument I corrected 
> but still it is not working no change on my vim editor.
>  1.I am using mobax term and under which I am using vim.
> 2. my vim background color is black and foreground text is white.
> 3. I search the text , then cursor come on text found and then press shift +* 
> but it did not highligh the whole word only first character is highlighted.

What is your 'hlsearch' setting?

    :verbose set hlsearch?

It defaults to off but must be on for highlighting to be applied to
highlight the entire text of a search match.  See

    :help 'hlsearch'

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427151936.GD28061%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Kunal Chauhan
1. when I do :verbose set hlsearch  , it gives or highlight all the string with background to yellow and foreground white is all search strings.

2. help hlsearch // what to see in it ,i am not able to get points from help ?

On Mon, Apr 27, 2020 at 8:50 PM Gary Johnson <[hidden email]> wrote:
On 2020-04-27, Kunal Chauhan wrote:
> Hi  tim,
>
> It is not working for me. 
> this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black guibg
> =yellow guifgi=black  " iillegal argument last one argument I corrected 
> but still it is not working no change on my vim editor.
>  1.I am using mobax term and under which I am using vim.
> 2. my vim background color is black and foreground text is white.
> 3. I search the text , then cursor come on text found and then press shift +* 
> but it did not highligh the whole word only first character is highlighted.

What is your 'hlsearch' setting?

    :verbose set hlsearch?

It defaults to off but must be on for highlighting to be applied to
highlight the entire text of a search match.  See

    :help 'hlsearch'

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427151936.GD28061%40phoenix.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc1cQ2cttYYwkRftnzc_LenHenMR5rfS36Xu-5smM%3Dmghw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Kunal Chauhan
Also I have noticed right now "verbose set hlsearch" is working when separately opening file but when I use cscope -R and from there I entered in file there it is not working ?

On Mon, Apr 27, 2020 at 9:42 PM Kunal Chauhan <[hidden email]> wrote:
1. when I do :verbose set hlsearch  , it gives or highlight all the string with background to yellow and foreground white is all search strings.

2. help hlsearch // what to see in it ,i am not able to get points from help ?

On Mon, Apr 27, 2020 at 8:50 PM Gary Johnson <[hidden email]> wrote:
On 2020-04-27, Kunal Chauhan wrote:
> Hi  tim,
>
> It is not working for me. 
> this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black guibg
> =yellow guifgi=black  " iillegal argument last one argument I corrected 
> but still it is not working no change on my vim editor.
>  1.I am using mobax term and under which I am using vim.
> 2. my vim background color is black and foreground text is white.
> 3. I search the text , then cursor come on text found and then press shift +* 
> but it did not highligh the whole word only first character is highlighted.

What is your 'hlsearch' setting?

    :verbose set hlsearch?

It defaults to off but must be on for highlighting to be applied to
highlight the entire text of a search match.  See

    :help 'hlsearch'

HTH,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427151936.GD28061%40phoenix.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc10i0dijASLsTRiU2udJKSuSDN1RMfsMnHgVLCPvPqeaQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Gary Johnson-4
In reply to this post by Kunal Chauhan
On 2020-04-27, Kunal Chauhan wrote:

> On Mon, Apr 27, 2020 at 8:50 PM Gary Johnson wrote:
>
>     On 2020-04-27, Kunal Chauhan wrote:
>     > Hi  tim,
>     >
>     > It is not working for me. 
>     > this is giving error "hi Search term=reverse ctermbg=yellow ctermfg=black
>     guibg
>     > =yellow guifgi=black  " iillegal argument last one argument I corrected 
>     > but still it is not working no change on my vim editor.
>     >  1.I am using mobax term and under which I am using vim.
>     > 2. my vim background color is black and foreground text is white.
>     > 3. I search the text , then cursor come on text found and then press
>     shift +* 
>     > but it did not highligh the whole word only first character is
>     highlighted.
>
>     What is your 'hlsearch' setting?
>
>         :verbose set hlsearch?
>
>     It defaults to off but must be on for highlighting to be applied to
>     highlight the entire text of a search match.  See
>
>         :help 'hlsearch'
>
>     HTH,
>     Gary

(I took the liberty of reformatting your post from top-posting to
bottom-posting style so that I could read it more easily.)

> 1. when I do :verbose set hlsearch  , it gives or highlight all
> the string with background to yellow and foreground white is all
> search strings.

The command I wrote included the question mark (?) at the end.

    :verbose set hlsearch?

That command will tell you the current setting of 'hlsearch' and
where it was last set.

I don't understand why the foreground of your search highlighting is
white.  The Search highlight setting that Tim gave you should have
set the foreground to black.  It does for me.

> 2. help hlsearch // what to see in it ,i am not able to get points
> from help ?

I just added that for reference, so that you could read more about
the 'hlsearch' option if you wanted to.

I don't completely understand the problem.  What do want to see when
you search and what are you seeing instead?  Also, what are the
results of these commands:

    :hi Search
    :version

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427175717.GE28061%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Gary Johnson-4
In reply to this post by Kunal Chauhan
On 2020-04-27, Kunal Chauhan wrote:
> Also I have noticed right now "verbose set hlsearch" is working when
> separately opening file but when I use cscope -R and from there I entered in
> file there it is not working ?

I would think that once you set 'hlsearch', it would stay set until
you explicitly changed it.  Perhaps some plugin is setting it to
off.  If you add the question mark (?) to that command as I wrote
a moment ago, you should see what set 'hlsearch' to off.  So, after
you execute your cscope command, execute

    :verbose set hlsearch?

with the question mark included.  That should tell you what set
'hlsearch' to off.

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427180454.GF28061%40phoenix.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Tim Chase
In reply to this post by Gary Johnson-4
On 2020-04-27 10:57, Gary Johnson wrote:
> The Search highlight setting that Tim gave you should have
> set the foreground to black.  It does for me.

...modulo my fat-fingered typo:

  guifgi=black

should have been

  guifg=black

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427142613.4cbadfe7%40bigbox.attlocal.net.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Kunal Chauhan
`Hi 
, I have tried just with  : hi Search ctermbg=LightBlue" it works as initially I tried with verbose command
but  I have puted in my .vimrc it is only showing yellow background and white text as I search by "/text" in vim 

On Tue, Apr 28, 2020 at 12:56 AM Tim Chase <[hidden email]> wrote:
On 2020-04-27 10:57, Gary Johnson wrote:
> The Search highlight setting that Tim gave you should have
> set the foreground to black.  It does for me.

...modulo my fat-fingered typo:

  guifgi=black

should have been

  guifg=black

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427142613.4cbadfe7%40bigbox.attlocal.net.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc36TuNG7%2BsWc1SkKDQjFj677ig%2BXLNR2VrwMhi_roiFnA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Kunal Chauhan
In reply to this post by Tim Chase
Hi 
, I have tried just with  : hi Search ctermbg=LightBlue" it works as initially I tried with verbose command
but  I have puted in my .vimrc it is only showing yellow background and white text as I search by "/text" in vim 

On Tue, Apr 28, 2020 at 12:56 AM Tim Chase <[hidden email]> wrote:
On 2020-04-27 10:57, Gary Johnson wrote:
> The Search highlight setting that Tim gave you should have
> set the foreground to black.  It does for me.

...modulo my fat-fingered typo:

  guifgi=black

should have been

  guifg=black

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200427142613.4cbadfe7%40bigbox.attlocal.net.


--
Thanks with Regards!

Kunal Chauhan
Mob:09813614826
Mob:08860397903

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACEFAc12kkLHoT8BTYGiThBnj%2BOzS%3DLLUzA82HgEvxO78Wkbfw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help can anybody tell me my search string background color need to be change

Tim Chase
On 2020-04-28 18:22, Kunal Chauhan wrote:
> , I have tried just with  : hi Search ctermbg=LightBlue" it works as
> initially I tried with verbose command
> but  I have puted in my .vimrc it is only showing yellow background
> and white text as I search by "/text" in vim

I suspect your vimrc sets your colorscheme after you explicitly set

  :hi Search …

That means that your setting gets overridden by your colorscheme.

This is why I recommended forking your favorite color-scheme into,
say, ~/.vim/colors/kunal.vim and then making the modifications there.
Then you can change your vimrc to have

  colorscheme kunal

for whatever colors you prefer.

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200428152937.21e82af1%40bigbox.attlocal.net.