Loading ...
Sorry, an error occurred while loading the content.

139069Re: Set different highlighting for Search versus current quickfix error

Expand Messages
  • Charles Campbell
    Sep 5 8:42 AM
      Tony Mechelynck wrote:
      > On 05/09/13 01:12, Paul wrote:
      >> On Wednesday, September 4, 2013 6:44:24 PM UTC-4, Tony Mechelynck wrote:
      >>> On 04/09/13 23:51, Paul wrote:
      >>>> The GUI highlighting for the current quickfix item seems to be the
      >>>> same as whatever I set the Search group to. Is there a way to have
      >>>> a different guibg color?
      >>>
      >>> ...With me it doesn't: I just did a :helpgrep, and the current quickfix
      >>> item didn't get _any_ highlighting: with the cursor on it,
      >>>
      >>> :echomsg synIDattr(synID(line("."),col("."),0),"name")
      >>> synIDattr(synIDtrans(synID(line("."),col("."),0)),"name")
      >>> synIDattr(synID(line("."),col("."),1),"name")
      >>> synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
      >>>
      >>> ...didn't display anything. Or if it did, it was because there was
      >>> some highlighted syntax item (such as between |bars|) just under the
      >>> cursor.
      >>>
      >>> I'm using gvim 7.4.16 (Huge) with GTK2/GNOME2 GUI.
      >>
      >> I'm using vim 7.3 on Windows 7. When I issue:
      >>
      >> :echomsg synIDattr(synID(line("."),col("."),0),"name")
      >> :echomsg synIDattr(synIDtrans(synID(line("."),col("."),0)),"name")
      >> :echomsg synIDattr(synID(line("."),col("."),1),"name")
      >> :echomsg synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
      >>
      >> I get:
      >>
      >> qfFileName
      >> Directory
      >> qfFileName
      >> Directory
      >>
      >> It's interesting that you don't see the current quickfix item
      >> highlighted. I thought that maybe I set something to turn on
      >> quickfix highlighting, but I can't seem to find the switch. I
      >> searched the web and the quickfix help to see if quickfix is
      >> *suppose* to highlight the current item by default, but didn't find
      >> indications of that either.
      >>
      >
      > I get the same as you do if I do :copen first. What I referred to was
      > the current quickfix item as found _in the text_ by :cnext, with no
      > quickfix window actually open.
      >
      > I see this item as blue on white, and doing ":verbose hi qfFileName"
      > in the quickfix window gives
      >
      > qfFileName xxx links to Directory
      > Last set from /usr/local/share/vim/vim74/syntax/qf.vim
      >
      > The Search highlight, OTOH, is black on yellow. Not at all the same
      > thing for me, which makes me ask: Which colorscheme are you using?
      >
      > To link qfFileName to something else, or to define specific colours
      > for it, just use a new or modified colorscheme.
      >
      > To modify a colorscheme, first copy it to ~/.vim/colors/ (for *x
      > systems) or to ~/vimfiles/colors (for Windows), change its name, and
      > modify it there (including setting g:colors_name to the new name);
      > then alter the calling line so that it calls the new name. It is not
      > possible to invoke colorschemes recursively (or at least, I tried and
      > didn't succeed).
      Sorry, Tony -- I need to differ with you on this.

      syntax/qf.vim is a syntax file; it is not a colorscheme, and it is
      unnecessary to modify or alter any colorschemes.

      Instead, if you wish to override qfFileName, etc, put your alterations into

      $HOME/after/syntax/qf.vim

      Therein, you may put things such as

      hi link qfFileName Special
      hi qfSeparator guifg=SeaGreen1 guibg=orange3

      Doing so will override syntax/qf.vim's selection of default colors.

      Regards,
      Chip Campbell

      --
      --
      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 vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 12 messages in this topic